"use client";
import { jsx } from "react/jsx-runtime";
import { createContext, useContext } from "react";
import { useSidebarState } from "../hooks/useSidebarState";
const SidebarContext = createContext(void 0);
function SidebarProvider({ children }) {
  const { isCollapsed, setIsCollapsed, toggleSidebar, isLoading } = useSidebarState();
  return /* @__PURE__ */ jsx(SidebarContext.Provider, { value: { isCollapsed, setIsCollapsed, toggleSidebar, isLoading }, children });
}
function useSidebar() {
  const context = useContext(SidebarContext);
  if (context === void 0) {
    throw new Error("useSidebar must be used within a SidebarProvider");
  }
  return context;
}
export {
  SidebarProvider,
  useSidebar
};
