{"version":3,"file":"CheckboxIndicator.jsx","sources":["../src/CheckboxIndicator.tsx"],"sourcesContent":["// Copyright 2026 The Lynx Authors. All rights reserved.\n// Licensed under the Apache License Version 2.0 that can be found in the\n// LICENSE file in the root directory of this source tree.\n\nimport { useContext } from '@lynx-js/react'\nimport type { ReactNode } from '@lynx-js/react'\n\nimport { ButtonContext } from '@lynx-js/lynx-ui-button'\nimport { clsx } from 'clsx'\n\nimport { CheckboxContext } from './CheckboxContext'\nimport type { CheckboxIndicatorProps } from './types'\n\nexport type { CheckboxProps, CheckboxIndicatorProps } from './types'\n\nexport const CheckboxIndicator = (props: CheckboxIndicatorProps): ReactNode => {\n  const { children, className, style, forceMount = false } = props\n  const { checked, indeterminate } = useContext(\n    CheckboxContext,\n  )\n  const { active, disabled } = useContext(ButtonContext)\n\n  return (\n    <view\n      style={style}\n      className={clsx(className, {\n        'ui-indeterminate': indeterminate,\n        'ui-checked': checked,\n        'ui-active': active,\n        'ui-disabled': disabled,\n      })}\n    >\n      {(forceMount || checked || indeterminate)\n        && children}\n    </view>\n  )\n}\n"],"names":["CheckboxIndicator","props","children","className","style","forceMount","checked","indeterminate","useContext","CheckboxContext","active","disabled","ButtonContext","view","clsx"],"mappings":";;;;AAeO,MAAMA,oBAAoB,CAACC;IAChC,MAAM,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,KAAK,EAAEC,aAAa,KAAK,EAAE,GAAGJ;IAC3D,MAAM,EAAEK,OAAO,EAAEC,aAAa,EAAE,GAAGC,WACjCC;IAEF,MAAM,EAAEC,MAAM,EAAEC,QAAQ,EAAE,GAAGH,WAAWI;IAExC,QACGC,KACC,OAAOT,OACP,WAAWU,KAAKX,WAAW;QACzB,oBAAoBI;QACpB,cAAcD;QACd,aAAaI;QACb,eAAeC;IACjB,IACD;MACC,CAAEN,AAAAA,CAAAA,cAAcC,WAAWC,aAAY,KAClCL,SAAS;IAChB,EAAEW;AAEN"}