{"version":3,"file":"normalizeDiffResolution.js","names":[],"sources":["../../src/utils/normalizeDiffResolution.ts"],"sourcesContent":["import type {\n  ConflictResolverTypes,\n  DiffAcceptRejectHunkConfig,\n  DiffAcceptRejectHunkType,\n} from '../types';\n\n// Normalize shorthand and config-object inputs into one internal resolution\n// mode so the rest of the helper only handles the three concrete diff states.\nexport function normalizeDiffResolution(\n  options:\n    | DiffAcceptRejectHunkType\n    | ConflictResolverTypes\n    | DiffAcceptRejectHunkConfig\n): 'deletions' | 'additions' | 'both' {\n  const type = (() => {\n    return typeof options === 'string' ? options : options.type;\n  })();\n\n  return type === 'accept' || type === 'incoming'\n    ? 'additions'\n    : type === 'reject' || type === 'current'\n      ? 'deletions'\n      : 'both';\n}\n"],"mappings":";AAQA,SAAgB,wBACd,SAIoC;CACpC,MAAM,cAAc;AAClB,SAAO,OAAO,YAAY,WAAW,UAAU,QAAQ;KACrD;AAEJ,QAAO,SAAS,YAAY,SAAS,aACjC,cACA,SAAS,YAAY,SAAS,YAC5B,cACA"}