{"version":3,"file":"Radio.cjs","sourceRoot":"","sources":["../../../../src/jsx/components/form/Radio.ts"],"names":[],"mappings":";;;AAAA,mDAAsD;AAiBtD,MAAM,IAAI,GAAG,OAAO,CAAC;AAErB;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,KAAK,GAAG,IAAA,+BAAmB,EAA0B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../../component';\n\n/**\n * The props of the {@link Radio} component.\n *\n * @property value - The value of the radio 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 radio is disabled.\n * @category Component Props\n */\ntype RadioProps = {\n  value: string;\n  children: string;\n  disabled?: boolean | undefined;\n};\n\nconst TYPE = 'Radio';\n\n/**\n * A radio component, which is used to create a radio option. This component\n * can only be used as a child of the {@link RadioGroup} component.\n *\n * @param props - The props of the component.\n * @param props.value - The value of the radio 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 radio is disabled.\n * @returns A radio element.\n * @example\n * <RadioGroup name=\"radio-group\">\n *  <Radio value=\"option1\">Option 1</Radio>\n *  <Radio value=\"option2\">Option 2</Radio>\n *  <Radio value=\"option3\">Option 3</Radio>\n * </RadioGroup>\n * @category Components\n */\nexport const Radio = createSnapComponent<RadioProps, typeof TYPE>(TYPE);\n\n/**\n * A radio element.\n *\n * @see {@link Radio}\n * @category Elements\n */\nexport type RadioElement = ReturnType<typeof Radio>;\n"]}