import { createContext, useContext, useState, type ReactNode } from 'react'; type TabId = 'docs' | 'compliance' | 'status' | 'rag'; interface AppContextValue { activeTab: TabId; setActiveTab: (tab: TabId) => void; } const AppContext = createContext(undefined); export const useApp = (): AppContextValue => { const context = useContext(AppContext); if (!context) { throw new Error('useApp must be used within an AppProvider'); } return context; }; interface AppProviderProps { children: ReactNode; } export const AppProvider: React.FC = ({ children }) => { const [activeTab, setActiveTab] = useState('compliance'); return ( {children} ); };