{"version":3,"file":"switch.mjs","sources":["../../../src/components/switch.tsx"],"sourcesContent":["import React, { forwardRef } from \"react\";\nimport type { ReactElement } from \"react\";\nimport RcSwitch, {\n    type SwitchChangeEventHandler,\n    type SwitchClickEventHandler,\n} from \"rc-switch\";\n\nexport interface SwitchProps\n    extends Omit<\n        React.HTMLAttributes<HTMLButtonElement>,\n        \"onChange\" | \"onClick\" | \"dangerouslySetInnerHTML\"\n    > {\n    className?: string;\n    disabled?: boolean;\n    checkedChildren?: React.ReactNode;\n    unCheckedChildren?: React.ReactNode;\n    onChange?: SwitchChangeEventHandler;\n    onKeyDown?: React.KeyboardEventHandler<HTMLButtonElement>;\n    onClick?: SwitchClickEventHandler;\n    tabIndex?: number;\n    checked?: boolean;\n    defaultChecked?: boolean;\n    loadingIcon?: React.ReactNode;\n    style?: React.CSSProperties;\n    title?: string;\n}\n\nexport const Switch = forwardRef<HTMLButtonElement, SwitchProps>(\n    function Switch(props, ref): ReactElement {\n        return <RcSwitch prefixCls=\"cui-switch\" {...props} ref={ref} />;\n    },\n);\n"],"names":["Switch","RcSwitch"],"mappings":";;;AA2BO,MAAM,MAAS,GAAA,UAAA;AAAA,EAClB,SAASA,OAAO,CAAA,KAAA,EAAO,GAAmB,EAAA;AACtC,IAAA,oDAAQC,QAAS,EAAA,EAAA,SAAA,EAAU,YAAc,EAAA,GAAG,OAAO,GAAU,EAAA,CAAA,CAAA;AAAA,GACjE;AACJ;;;;"}