{"version":3,"file":"Branch.cjs","names":[],"sources":["../../../src/components/branches/Branch.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\ntype BranchProps = {\n  children?: ReactNode;\n  branch?: string | number | boolean;\n  _locale?: string;\n  _enableI18n?: boolean;\n  [key: string]: ReactNode;\n};\n\n// ===== Component ===== //\n\n/**\n * External-store version of the `<Branch>` component.\n */\nfunction GtInternalBranch({\n  children,\n  branch,\n  _locale,\n  _enableI18n,\n  ...branches\n}: BranchProps): ReactNode {\n  void _locale;\n  void _enableI18n;\n\n  let branchKey = branch?.toString();\n  if (typeof branchKey === 'string' && branchKey.startsWith('data-')) {\n    branchKey = undefined;\n  }\n  return branchKey && typeof branches[branchKey] !== 'undefined'\n    ? branches[branchKey]\n    : children;\n}\n\nfunction Branch(props: BranchProps): React.JSX.Element {\n  return <GtInternalBranch {...props} />;\n}\n\n/** @internal _gtt - The GT transformation for the component. */\nBranch._gtt = 'branch';\nGtInternalBranch._gtt = 'branch-automatic';\n\n// ===== Exports ===== //\n\nexport { GtInternalBranch, Branch };\n"],"mappings":"mFAeA,SAAS,EAAiB,CACxB,WACA,SACA,UACA,cACA,GAAG,GACsB,CAIzB,IAAI,EAAY,GAAQ,UAAU,CAIlC,OAHI,OAAO,GAAc,UAAY,EAAU,WAAW,QAAQ,GAChE,EAAY,IAAA,IAEP,GAAoB,EAAS,KAAe,OAC/C,EAAS,GACT,EAGN,SAAS,EAAO,EAAuC,CACrD,OAAO,EAAA,EAAA,KAAC,EAAD,CAAkB,GAAI,EAAS,CAAA,CAIxC,EAAO,KAAO,SACd,EAAiB,KAAO"}