import { jsxs as u, jsx as a } from "react/jsx-runtime";
import { forwardRef as _, Fragment as x } from "react";
import { cx as y } from "../../utils/classNames.js";
import { useArrowTheme as w } from "../../hooks/useArrowTheme.js";
const N = _(
  ({
    id: e,
    label: r,
    checked: o,
    defaultChecked: t,
    disabled: i = !1,
    inverse: l,
    describedBy: d,
    labelledById: s,
    ariaLabel: c,
    hover: f = !1,
    pressed: m = !1,
    focused: n = !1,
    className: g,
    ...p
  }, h) => {
    const v = w(), b = l ?? v.inverse;
    return /* @__PURE__ */ u(x, { children: [
      /* @__PURE__ */ a(
        "input",
        {
          ref: h,
          id: e,
          type: "checkbox",
          role: "switch",
          className: "tdds-toggle__input tdds:screen-reader-only",
          checked: o,
          defaultChecked: o === void 0 ? t : void 0,
          "aria-disabled": i || void 0,
          "aria-labelledby": s,
          "aria-describedby": d,
          ...p
        }
      ),
      /* @__PURE__ */ a(
        "label",
        {
          htmlFor: e,
          className: y(
            "tdds-toggle__label",
            {
              "tdds-toggle__switch-only": !r,
              "force-hover": f,
              "force-pressed": m,
              "force-focus": n
            },
            g
          ),
          "data-inverse": b ? "true" : void 0,
          "aria-label": s ? void 0 : c,
          children: r
        }
      )
    ] });
  }
);
N.displayName = "Toggle";
export {
  N as Toggle
};
//# sourceMappingURL=Toggle.js.map
