import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
import './RadioGroup.scss';
import classNames from 'classnames';
import Typography from '../Typography';
import RadioButton from '../RadioButton';
const RadioGroup = ({ options, name, selectedValue, onChange, label, isLabel = false, isAsteriskRequired = false, className, classNameForLabel, isError = false, errorMessage = '', onBlur = () => { }, disabled, }) => {
    return (_jsxs(_Fragment, { children: [_jsxs("div", { className: classNames('ff-radio-group', className), onBlur: onBlur, children: [isLabel && (_jsxs(Typography, { fontWeight: "semi-bold", className: classNames(classNameForLabel), children: [' ', isAsteriskRequired && (_jsxs(Typography, { className: classNames('ff-required-asterisk'), children: ["*", ' '] })), label, ' '] })), options.map((option) => (_jsx(RadioButton, { label: option.label, showTooltip: option?.showTooltip, tooltipChildren: option?.tooltipChildren, tooltipTitle: option?.tooltipTitle, tooltipPosition: option?.tooltipPosition, name: name, value: option.value, checked: selectedValue?.toLowerCase() === option.value?.toLowerCase(), onChange: () => onChange?.(option), disabled: disabled || option.disabled }, option.value)))] }), isError && (_jsx(Typography, { as: "div", lineHeight: "15px", fontSize: 10, color: "var(--error_light)", className: "ff-radio-error-msg", children: errorMessage }))] }));
};
export default RadioGroup;
//# sourceMappingURL=RadioGroup.js.map