import { jsxs, jsx } from 'react/jsx-runtime';
import Tooltip from '../Tooltip/Tooltip.js';
import Typography from '../Typography/Typography.js';

const RadioButton = ({
  label,
  name,
  checked,
  onChange,
  value,
  disabled = false,
  showTooltip = false,
  tooltipChildren = 'Custom JSX',
  tooltipTitle = 'Custom JSX',
  tooltipPosition = 'right',
  onBlur = () => {}
}) => {
  return jsxs("div", {
    className: "ff-radio-wrapper",
    onClick: event => event.stopPropagation(),
    children: [jsxs("label", {
      className: `ff-radio ${disabled ? 'ff-radio--disabled' : ''}`,
      children: [jsx("input", {
        disabled: disabled,
        type: "radio",
        name: name,
        value: value,
        checked: checked,
        onChange: onChange,
        onBlur: onBlur,
        className: "ff-radio-input"
      }), jsx("div", {
        className: "ff-radio-custom",
        children: jsx("div", {
          className: "ff-radio-custom-fill"
        })
      }), jsx(Typography, {
        color: "var(--text-color)",
        children: label
      })]
    }), showTooltip && jsx(Tooltip, {
      title: tooltipTitle,
      placement: tooltipPosition,
      children: tooltipChildren
    })]
  });
};

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