import { jsxs as m, jsx as l } from "react/jsx-runtime";
import { cn as o } from "../../utils/cn/cn.es.js";
import r from "../../components/RadioButton/radioButton.module.css";
import { Typography as c } from "../Typography/Typography.es.js";
const u = ({
  label: i,
  checked: s = !1,
  disabled: a = !1,
  inverted: t = !1,
  onChange: e
}) => /* @__PURE__ */ m(
  "label",
  {
    className: o(
      r.root,
      s && r.checked,
      a && r.disabled,
      t && r.inverted
    ),
    children: [
      /* @__PURE__ */ l(
        "input",
        {
          type: "radio",
          checked: s,
          disabled: a,
          onChange: () => !a && (e == null ? void 0 : e(!s)),
          className: r.input
        }
      ),
      /* @__PURE__ */ l("div", { className: r.circle, children: /* @__PURE__ */ l("div", { className: r.innerCircle }) }),
      i && /* @__PURE__ */ l(c, { defaultVariant: "labelMd", className: r.label, children: i })
    ]
  }
);
export {
  u as RadioButton
};
