import { createContext, useContext, useState, type ReactNode } from "react"; interface CommandMenuContextType { open: boolean; setOpen: (open: boolean) => void; } const CommandMenuContext = createContext( undefined, ); export function CommandMenuProvider({ children }: { children: ReactNode }) { const [open, setOpen] = useState(false); return ( {children} ); } export function useCommandMenu() { const context = useContext(CommandMenuContext); if (context === undefined) { throw new Error("useCommandMenu must be used within a CommandMenuProvider"); } return context; }