import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useOneUIConfig } from "../../context/OneUIProvider";
import Styles from "./Radio.module.scss";
import { Checkmark } from "./variants/Checkmark/Checkmark";
export default function Radio({ checked, onToggle, label, className = "", size = undefined, groupId, value, ...props }) {
    const Checkbox = useOneUIConfig("component.radio.Component", Checkmark);
    return (_jsxs("label", { className: `${Styles.container} ${className}`, style: { fontSize: size }, onClick: (e) => {
            onToggle(!checked);
            e.preventDefault();
        }, children: [_jsx(Checkbox, { checked: checked, hasContent: !!label, ...props }), _jsx("input", { type: "radio", name: groupId, id: value, value: value, checked: checked, readOnly: true, "data-testid": props["data-testid"] }), label] }));
}
//# sourceMappingURL=Radio.js.map