{"version":3,"file":"RadioSimple.cjs","sources":["../../../../src/components/forms/RadioSimple.tsx"],"sourcesContent":["import React from \"react\";\n\ninterface RadioSimpleProps {\n  id: string;\n  name: string;\n  value: string | number;\n  label: string;\n  checked?: boolean;\n  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n  note?: string;\n}\n\n/**\n *\n * @component\n * @example\n * ```tsx\n * import { RadioSimple } from \"@instincthub/react-ui\";\n *\n * <RadioSimple\n *   id=\"radio-simple\"\n *   name=\"radio-simple\"\n *   value=\"1\"\n *   label=\"Radio Simple\"\n *   checked={true}\n *   inputEvent={(e) => {\n *     console.log(e);\n *   }}\n * />\n * ```\n * Props interface for the RadioSimple component\n * @property {string} id - ID for the radio input\n * @property {string} name - Name for the radio input\n * @property {string | number} value - Value for the radio input\n * @property {string} label - Label for the radio input\n * @property {boolean} checked - Whether the radio input is checked\n * @property {(e: React.ChangeEvent<HTMLInputElement>) => void} inputEvent - Callback for input events\n */\n\nconst RadioSimple: React.FC<RadioSimpleProps> = ({\n  id,\n  name,\n  value,\n  label,\n  checked,\n  onChange,\n  note,\n}) => {\n  const handleRadio = (e: React.ChangeEvent<HTMLInputElement>) => {\n    if (onChange) onChange(e);\n  };\n\n  return (\n    <section className=\"ihub-radio-btn\">\n      <label htmlFor={id} className=\"ihub-radio-label\">\n        <input\n          className=\"ihub-radio-input\"\n          type=\"radio\"\n          name={name}\n          id={id}\n          value={value}\n          onChange={handleRadio}\n          defaultChecked={checked}\n        />\n        <span className=\"ihub-custom-radio\" />\n        <p className=\"ihub-p-label\">{label}</p>\n      </label>\n      {note && <p className=\"ihub-input-notes\">{note}</p>}\n    </section>\n  );\n};\n\nexport default RadioSimple;\n"],"names":["_ref","id","name","value","label","checked","onChange","note","_jsxs","className","children","jsxs","htmlFor","_jsx","jsx","type","e","defaultChecked"],"mappings":"uHAuCgD,SAA/BA,GAQZ,IAPHC,EAAED,EAAFC,GACAC,EAAIF,EAAJE,KACAC,EAAKH,EAALG,MACAC,EAAKJ,EAALI,MACAC,EAAOL,EAAPK,QACAC,EAAQN,EAARM,SACAC,EAAIP,EAAJO,KAMA,OACEC,EAAAA,KAAA,UAAA,CAASC,UAAU,iBACjBC,SAAA,CAAAF,EAAAG,KAAA,QAAA,CAAOC,QAASX,EAAIQ,UAAU,mBAC5BC,SAAA,CAAAG,EAAAC,IAAA,QAAA,CACEL,UAAU,mBACVM,KAAK,QACLb,KAAMA,EACND,GAAIA,EACJE,MAAOA,EACPG,SAbY,SAACU,GACfV,GAAUA,EAASU,IAajBC,eAAgBZ,IAElBQ,EAAAC,IAAA,OAAA,CAAML,UAAU,sBAChBI,WAAGJ,UAAU,eAAcC,SAAEN,OAE9BG,GAAQM,EAAAC,IAAA,IAAA,CAAGL,UAAU,mBAAoBC,SAAAH,MAGhD"}