"use client";
import * as l from "react";
import { composeEventHandlers as n } from "../../../../../@radix-ui_primitive@1.1.1/node_modules/@radix-ui/primitive/dist/index.js";
import { useControllableState as f } from "../../../../../@radix-ui_react-use-controllable-state@1.1.0_@types_react@19.0.10_react@19.0.0/node_modules/@radix-ui/react-use-controllable-state/dist/index.js";
import { Primitive as m } from "../../../../../@radix-ui_react-primitive@2.0.2_@types_react-dom@19.0.4_@types_react@19.0.10__@types_react@19_i7clg2yux7aeir464mbcqjzvuu/node_modules/@radix-ui/react-primitive/dist/index.js";
import { jsx as p } from "react/jsx-runtime";
var b = "Toggle", u = l.forwardRef((e, r) => {
  const { pressed: t, defaultPressed: s = !1, onPressedChange: a, ...d } = e, [o = !1, i] = f({
    prop: t,
    onChange: a,
    defaultProp: s
  });
  return /* @__PURE__ */ p(
    m.button,
    {
      type: "button",
      "aria-pressed": o,
      "data-state": o ? "on" : "off",
      "data-disabled": e.disabled ? "" : void 0,
      ...d,
      ref: r,
      onClick: n(e.onClick, () => {
        e.disabled || i(!o);
      })
    }
  );
});
u.displayName = b;
export {
  u as Toggle
};
//# sourceMappingURL=index.js.map
