import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
import classNames from '../../_virtual/index.js';
import Typography from '../Typography/Typography.js';
import RadioButton from '../RadioButton/RadioButton.js';

const RadioGroup = ({ options, name, selectedValue, onChange, label, isLabel = false, isAsteriskRequired = false, className, classNameForLabel, isError = false, errorMessage = '', onBlur = () => { }, disabled, radioIconCenter = true, radioMarginTop, }) => {
    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, alignIconCenter: radioIconCenter, radioMarginTop: radioMarginTop }, option.value)))] }), isError && (jsx(Typography, { as: "div", lineHeight: "15px", fontSize: 10, color: "var(--error_light)", className: "ff-radio-error-msg", children: errorMessage }))] }));
};

export { RadioGroup as default };
//# sourceMappingURL=RadioGroup.js.map
