import { jsxs as n, jsx as t } from "react/jsx-runtime";
/* empty css                       */
import { classNames as f } from "./index-classNames.js";
import { Render as x } from "./index-Render.js";
import { Text as N, FontWeights as o } from "./index-Text.js";
import "react";
import { ComponentContainer as R } from "./index-ComponentContainer.js";
const z = (s) => {
  const {
    inputName: g,
    labelText: a,
    value: d,
    checked: e,
    labelClassName: r,
    onChangeFn: c,
    testId: m,
    theme: l,
    translate: p = !0,
    replacements: u,
    capitalizeOption: h,
    disabled: i,
    children: b
  } = s;
  return n(R, {
    className: f("RadioButton", l, e ? "checked" : "", i ? "disabled" : ""),
    children: [n("label", {
      className: `RadioButton-label ${r}`,
      children: [t("input", {
        "data-testid": m,
        className: "RadioButton-input",
        hidden: !0,
        // name={inputName+M}
        type: "radio",
        value: d,
        checked: e,
        disabled: i,
        onChange: () => c()
      }), t("div", {
        className: `${l === "success" ? "RadioButton-label-text-success" : "RadioButton-label-text"} ${e ? "checked" : ""} ${i ? "disabled" : ""}`,
        children: typeof a == "string" ? t(N, {
          capitalize: h,
          translate: p,
          replacements: u,
          fontWeight: e ? o.medium : o.regular,
          children: a
        }) : a
      })]
    }), t(x, {
      if: e,
      children: b
    })]
  });
};
export {
  z as RadioButton
};
