{"version":3,"file":"SelectorOption.mjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/SelectorOption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,4BAAwB;AAkBtD,MAAM,IAAI,GAAG,gBAAgB,CAAC;AAE9B;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,mBAAmB,CAG/C,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\nimport type { CardElement } from '../Card';\n\n/**\n * The props of the {@link SelectorOption} component.\n *\n * @property value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @property children - The component to display.\n * @property disabled - Whether the selector option is disabled.\n * @category Component Props\n */\nexport type SelectorOptionProps = {\n  value: string;\n  children: CardElement;\n  disabled?: boolean;\n};\n\nconst TYPE = 'SelectorOption';\n\n/**\n * A selector option component, which is used to create a selector option. This component\n * can only be used as a child of the {@link Selector} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the selector option. This is used to populate the\n * state in the form data.\n * @param props.children - The component to display.\n * @param props.disabled - Whether the selector option is disabled.\n * @returns A selector option element.\n * @example\n * <Selector name=\"selector\">\n *  <SelectorOption value=\"option1\"><Card title=\"Option 1\" value=\"Foo\" /></SelectorOption>\n *  <SelectorOption value=\"option2\"><Card title=\"Option 2\" value=\"Bar\" /></SelectorOption>\n *  <SelectorOption value=\"option3\"><Card title=\"Option 3\" value=\"Baz\" /></SelectorOption>\n * </Selector>\n * @category Components\n */\nexport const SelectorOption = createSnapComponent<\n  SelectorOptionProps,\n  typeof TYPE\n>(TYPE);\n\n/**\n * A selector option element.\n *\n * @see {@link SelectorOption}\n * @category Elements\n */\nexport type SelectorOptionElement = ReturnType<typeof SelectorOption>;\n"]}