{"version":3,"file":"Option.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Option.ts"],"names":[],"mappings":";;;AAIA,mDAAsD;AAiBtD,MAAM,IAAI,GAAG,QAAQ,CAAC;AAEtB;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,MAAM,GAAG,IAAA,+BAAmB,EAA2B,IAAI,CAAC,CAAC","sourcesContent":["// TODO: Either fix this lint violation or explain why it's necessary to\n//  ignore.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nimport type { Dropdown } from './Dropdown';\nimport { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link Option} component.\n *\n * @property value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @property children - The text to display.\n * @property disabled - Whether the option is disabled.\n * @category Component Props\n */\ntype OptionProps = {\n  value: string;\n  children: string;\n  disabled?: boolean;\n};\n\nconst TYPE = 'Option';\n\n/**\n * A dropdown option component, which is used to create a dropdown option. This component\n * can only be used as a child of the {@link Dropdown} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the dropdown option. This is used to populate the\n * state in the form data.\n * @param props.children - The text to display.\n * @param props.disabled - Whether the option is disabled.\n * @returns A dropdown option element.\n * @example\n * <Dropdown name=\"dropdown\">\n *  <Option value=\"option1\">Option 1</Option>\n *  <Option value=\"option2\">Option 2</Option>\n *  <Option value=\"option3\">Option 3</Option>\n * </Dropdown>\n * @category Components\n */\nexport const Option = createSnapComponent<OptionProps, typeof TYPE>(TYPE);\n\n/**\n * A dropdown option element.\n *\n * @see {@link Option}\n * @category Elements\n */\nexport type OptionElement = ReturnType<typeof Option>;\n"]}