import { StoreState } from '../state/store'; /** * Selector function type */ export type Selector = (state: StoreState) => T; /** * Hook for accessing specific state slice */ export declare function useGlobalStore(selector: Selector): T; /** * Hook for accessing multiple state slices * * Note: Uses a combined selector to comply with Rules of Hooks. * Hooks must not be called inside loops, conditions, or nested functions. */ export declare function useGlobalStoreMultiple>(selectors: { [K in keyof T]: Selector; }): T; /** * Hook for computed values from store * * Uses the compute function directly as a selector with memoization * to prevent unnecessary re-renders. */ export declare function useGlobalStoreComputed(compute: (state: StoreState) => T, deps?: unknown[]): T; /** * Hook for store actions */ export declare function useGlobalStoreActions(): Record; /** * Hook for checking if store is hydrated (useful for SSR) */ export declare function useStoreHydrated(): boolean; /** * Create a bound selector hook for a specific slice */ export declare function createSliceHook(selector: Selector): () => T; /** * Create a bound action hook */ export declare function createActionHook unknown>(actionSelector: Selector): () => T; /** * Hook for subscribing to store changes with callback */ export declare function useGlobalStoreSubscription(selector: Selector, callback: (value: T, prevValue: T) => void): { value: T; ref: (node: T | null) => void; }; /** * Common selectors for convenience */ export declare const globalSelectors: { readonly sidebarOpen: (state: StoreState) => boolean; readonly theme: (state: StoreState) => string; readonly currentUser: (state: StoreState) => unknown; readonly isAuthenticated: (state: StoreState) => boolean; readonly notifications: (state: StoreState) => unknown[]; readonly unreadCount: (state: StoreState) => number; }; /** * Pre-built hooks using common selectors */ export declare const useIsSidebarOpen: () => boolean; export declare const useCurrentUser: () => unknown; export declare const useIsAuthenticated: () => boolean; export declare const useUnreadNotificationCount: () => number;