import { jsxs as N, jsx as a } from "react/jsx-runtime";
import { useMemo as k } from "react";
import { I as p } from "../input/input.js";
import { L as x } from "../label/label.js";
import { c as v, s as O, p as R, b as w, a as L } from "../tools/tools.js";
const S = function(d) {
  const {
    as: o = "input",
    children: t,
    className: r,
    contentClasses: f,
    dropOldClass: l,
    id: e,
    inline: h,
    reverse: u,
    style: n,
    switch: y,
    variables: c,
    ...i
  } = d, m = k(() => {
    const s = v(!l && "form-check-input", r), C = O((B, b) => ({ tKey: L(b) }), c, n);
    return {
      className: s,
      style: C
    };
  }, [l, r, c, n]);
  if (t) {
    const s = R(f, {
      component: "form-check-input",
      container: w(
        null,
        "form-check",
        y && "form-switch",
        h && "form-check-inline",
        u && "form-check-reverse"
      ),
      label: "form-check-label"
    });
    return /* @__PURE__ */ N("div", { className: s.container, "data-slot-container": "", children: [
      /* @__PURE__ */ a(
        p,
        {
          ...i,
          ...m,
          as: o,
          className: s.component,
          "data-slot-component": "",
          dropOldClass: !0,
          id: e,
          type: "radio"
        }
      ),
      /* @__PURE__ */ a(x, { className: s.label, "data-slot-label": "", dropOldClass: !0, htmlFor: e, children: t })
    ] });
  }
  return /* @__PURE__ */ a(p, { ...i, ...m, as: o, id: e, type: "radio" });
};
S.displayName = "BRL.Radio";
export {
  S as R
};
//# sourceMappingURL=radio.js.map
