import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import css from './Radio.module.scss';
import { _cx } from 'src/utility/class';
var cx = _cx(css);
export default function Radio(_a) {
    var id = _a.id, label = _a.label, value = _a.value, checked = _a.checked, onChange = _a.onChange, useSpaceAfter = _a.useSpaceAfter, useSpaceBelow = _a.useSpaceBelow, icon = _a.icon, width = _a.width;
    var event = {
        target: {
            type: 'radio',
            value: value,
        },
    };
    return (_jsxs("div", { className: "radio-wrapper-ref ".concat(cx('input-wrapper', {
            useSpaceAfter: useSpaceAfter,
            useSpaceBelow: !!useSpaceBelow,
        })), style: { width: width }, children: [_jsx("input", { className: cx('radio-button'), type: "radio", id: id, checked: checked, value: value, onChange: onChange }), _jsx("div", { className: cx('radio-circle'), onClick: function () { return onChange(event); } }), label && (_jsxs("label", { htmlFor: id, className: cx('label-container'), children: [icon && _jsx("img", { className: cx('icon'), src: icon, alt: label }), label] }))] }));
}
