import { jsx as r } from "react/jsx-runtime";
import { ChevronRight as n, ChevronLeft as c } from "lucide-react";
import { useCallback as b } from "react";
import { useSidebarContext as l } from "../../context/sidebarContext.js";
import { c as i } from "../../../../index-BtlgVD4m.js";
const d = ({ className: a }) => {
  const { collapsed: e, onCollapsedChange: s } = l(), o = b(() => {
    s(!e);
  }, [e, s]), t = e ? n : c;
  return e ? /* @__PURE__ */ r("div", { className: "flex justify-center p-[var(--spacing-2)] pb-0", children: /* @__PURE__ */ r(
    "button",
    {
      type: "button",
      "aria-label": "Expand sidebar",
      onClick: o,
      className: i(
        "flex",
        "items-center",
        "justify-center",
        "size-[var(--spacing-7)]",
        "rounded-[var(--border-radius-md)]",
        "border",
        "border-[var(--base-input)]",
        "bg-[var(--base-background)]",
        "hover:bg-[var(--base-sidebar-accent)]",
        "transition-colors",
        "cursor-pointer",
        a
      ),
      children: /* @__PURE__ */ r(t, { className: "size-[var(--spacing-4)]" })
    }
  ) }) : /* @__PURE__ */ r(
    "button",
    {
      type: "button",
      "aria-label": "Collapse sidebar",
      onClick: o,
      className: i(
        "absolute",
        "right-0",
        "top-[var(--spacing-3)]",
        "z-10",
        "translate-x-1/2",
        "flex",
        "items-center",
        "justify-center",
        "size-[var(--spacing-7)]",
        "rounded-[var(--border-radius-md)]",
        "border",
        "border-[var(--base-input)]",
        "bg-[var(--base-background)]",
        "hover:bg-[var(--base-sidebar-accent)]",
        "transition-colors",
        "cursor-pointer",
        a
      ),
      children: /* @__PURE__ */ r(t, { className: "size-[var(--spacing-4)]" })
    }
  );
};
d.displayName = "SidebarToggle";
export {
  d as default
};
//# sourceMappingURL=SidebarToggle.js.map
