import { createContext, type ReactNode, useContext } from "react"; import { useSidePanelState } from "../hooks/use-side-panel-state.js"; type SidePanelContextValue = ReturnType; const SidePanelContext = createContext(null); export function SidePanelProvider({ children }: { children: ReactNode }) { const value = useSidePanelState(); return ( {children} ); } export function useSidePanelContext(): SidePanelContextValue { const ctx = useContext(SidePanelContext); if (!ctx) throw new Error("useSidePanelContext requires SidePanelProvider"); return ctx; }