{"version":3,"file":"index.DOJXSVzB.js","sources":["../../../../../../../node_modules/@babylon/ui-kit-forms/components/inputs/radio-button-group/components/radio-button/index.js","../../../../../../../node_modules/@babylon/ui-kit-forms/components/inputs/radio-button-group/index.js"],"sourcesContent":["import { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef, useId } from 'react';\nimport { RadioButtonItemWrapper, RadioButtonInput, RadioButtonLabel, RadioButtonRightContent, RadioButtonLabelCount } from './styled.js';\n\nconst RadioButton = /*#__PURE__*/ forwardRef(({ label, id = null, value, checked = false, disabled = false, count, onChange, onClick, onBlur, hasError, className, variant = 'default', extended = false, rightContent, ...rest }, ref)=>{\n const radioId = useId();\n return /*#__PURE__*/ jsxs(RadioButtonItemWrapper, {\n $withCount: typeof count == 'number',\n $variant: variant,\n $extended: extended,\n className: className,\n children: [\n /*#__PURE__*/ jsx(RadioButtonInput, {\n ref: ref,\n type: \"radio\",\n id: id ?? radioId,\n value: value,\n checked: checked,\n disabled: disabled,\n onChange: onChange,\n onClick: onClick,\n onBlur: onBlur,\n role: \"radio\",\n \"data-testid\": \"RadioButton\",\n ...rest\n }),\n /*#__PURE__*/ jsxs(RadioButtonLabel, {\n $checked: checked,\n $withCount: typeof count == 'number',\n htmlFor: id ?? radioId,\n $hasError: hasError,\n $disabled: disabled,\n children: [\n /*#__PURE__*/ jsx(\"span\", {\n children: label\n }),\n rightContent && /*#__PURE__*/ jsx(RadioButtonRightContent, {\n children: rightContent\n }),\n count && /*#__PURE__*/ jsx(RadioButtonLabelCount, {\n children: count\n })\n ]\n })\n ]\n });\n});\nRadioButton.displayName = 'RadioButton';\n\nexport { RadioButton as default };\n","import { jsxs, Fragment, jsx } from 'react/jsx-runtime';\nimport ErrorTooltip from '../../others/error-tooltip/index.js';\nimport { useInput } from '../../../hooks/useInput/index.js';\nimport { forwardRef, useRef, Children } from 'react';\nimport RadioButton from './components/radio-button/index.js';\nimport { RadioButtonWrapper } from './styled.js';\n\nconst RadioButtonGroup = /*#__PURE__*/ forwardRef(({ options, onChange, onClick, disabled = false, className, variant = 'horizontal', radioVariant, error, hasError, ...rest }, ref)=>{\n const wrapperRef = useRef(null);\n return /*#__PURE__*/ jsxs(Fragment, {\n children: [\n /*#__PURE__*/ jsx(RadioButtonWrapper, {\n ref: wrapperRef,\n \"data-testid\": \"RadioButtonGroup\",\n className: className,\n $variant: variant,\n ...rest,\n children: Children.toArray(options.map((radio)=>/*#__PURE__*/ jsx(RadioButton, {\n label: radio.label,\n name: radio.name,\n value: radio.value,\n checked: typeof rest.value === 'undefined' ? radio.checked : String(rest.value) === String(radio.value),\n onChange: onChange,\n onClick: onClick,\n count: radio.count,\n rightContent: radio.rightContent,\n disabled: disabled,\n variant: radioVariant,\n hasError: hasError,\n ref: ref,\n extended: options.length <= 2\n })))\n }),\n /*#__PURE__*/ jsx(ErrorTooltip, {\n referenceElement: wrapperRef.current,\n error: error,\n isVisible: !!hasError\n })\n ]\n });\n});\nRadioButtonGroup.displayName = 'RadioButtonGroup';\nconst FormRadioButtonGroup = (props)=>{\n const { isHiddenRequired: _isHiddenRequired, ...rest } = props;\n const { field, error, hasError } = useInput(props);\n return /*#__PURE__*/ jsx(RadioButtonGroup, {\n ...rest,\n ...field,\n error: error,\n hasError: hasError\n });\n};\n\nexport { FormRadioButtonGroup, RadioButtonGroup as default };\n"],"names":["RadioButton","forwardRef","label","id","value","checked","disabled","count","onChange","onClick","onBlur","hasError","className","variant","extended","rightContent","rest","ref","radioId","useId","jsxs","RadioButtonItemWrapper","jsx","RadioButtonInput","RadioButtonLabel","RadioButtonRightContent","RadioButtonLabelCount","RadioButtonGroup","options","radioVariant","error","wrapperRef","useRef","Fragment","RadioButtonWrapper","Children","radio","ErrorTooltip","FormRadioButtonGroup","props","_isHiddenRequired","field","useInput"],"mappings":"+GAIK,MAACA,EAA4BC,EAAU,WAAC,CAAC,CAAE,MAAAC,EAAO,GAAAC,EAAK,KAAM,MAAAC,EAAO,QAAAC,EAAU,GAAO,SAAAC,EAAW,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