import { StoreSelector } from '../store'; /** * Select state with custom equality function * * @example * ```typescript * const count = useStoreState((state) => state.count); * ``` */ export declare function useStoreState(selector: StoreSelector): T; /** * Select state with shallow equality (recommended for objects/arrays) * * Use this when selecting objects or arrays to prevent unnecessary re-renders. * * @example * ```typescript * const settings = useShallowState((state) => ({ * locale: state.locale, * timezone: state.timezone, * })); * ``` */ export declare function useShallowState(selector: StoreSelector): T; /** * Select an action (stable reference, never causes rerender) * * @example * ```typescript * const toggleSidebar = useStoreAction((state) => state.toggleSidebar); * ``` */ export declare function useStoreAction unknown>(selector: StoreSelector): T; /** * Use UI state (shallow comparison) */ export declare function useUIState(): { sidebarOpen: boolean; sidebarCollapsed: boolean; activeModal: string | null; modalData: Record | null; globalLoading: boolean; loadingMessage: string | null; }; /** * Use UI actions (stable references) */ export declare function useUIActions(): { toggleSidebar: () => void; setSidebarOpen: (open: boolean) => void; setSidebarCollapsed: (collapsed: boolean) => void; openModal: (id: string, data?: Record) => void; closeModal: () => void; setGlobalLoading: (loading: boolean, message?: string) => void; }; /** * Use session state (shallow comparison) */ export declare function useSessionState(): { sessionId: string | null; isSessionActive: boolean; lastActivity: number | null; navigationHistory: string[]; }; /** * Use session actions (stable references) */ export declare function useSessionActions(): { initSession: (sessionId: string, options?: { expiresInMs?: number; deviceId?: string; }) => void; updateActivity: () => void; endSession: () => void; addToHistory: (path: string) => void; clearHistory: () => void; }; /** * Use settings state (shallow comparison) */ export declare function useSettingsState(): { locale: string; timezone: string; dateFormat: string; timeFormat: string; numberFormat: string; notificationsEnabled: boolean; soundEnabled: boolean; desktopNotifications: boolean; reducedMotion: boolean; highContrast: boolean; fontSize: string; }; /** * Use settings actions (stable references) */ export declare function useSettingsActions(): { setLocale: (locale: string) => void; setTimezone: (timezone: string) => void; setDateFormat: (format: string) => void; setTimeFormat: (format: string) => void; setNotificationsEnabled: (enabled: boolean) => void; setSoundEnabled: (enabled: boolean) => void; setDesktopNotifications: (enabled: boolean) => void; setReducedMotion: (enabled: boolean) => void; setHighContrast: (enabled: boolean) => void; setFontSize: (size: string) => void; resetSettings: () => void; }; /** * Use sidebar state and actions * Combined into single subscription with shallow equality for performance */ export declare function useSidebar(): { isOpen: boolean; isCollapsed: boolean; toggle: () => void; setOpen: (open: boolean) => void; setCollapsed: (collapsed: boolean) => void; }; /** * Use modal state and actions * Combined into single subscription with shallow equality for performance */ export declare function useModal = Record>(): { activeModal: string | null; data: T | null; isOpen: boolean; open: (id: string, data?: Record) => void; close: () => void; }; /** * Check if a specific modal is open */ export declare function useIsModalOpen(modalId: string): boolean; /** * Use loading state and actions * Combined into single subscription with shallow equality for performance */ export declare function useLoading(): { isLoading: boolean; message: string | null; start: (loadingMessage?: string) => void; stop: () => void; }; /** * Use display settings (memoized) */ export declare function useDisplaySettings(): { locale: string; timezone: string; dateFormat: string; timeFormat: string; numberFormat: string; }; /** * Use accessibility settings (memoized) */ export declare function useAccessibilitySettings(): { reducedMotion: boolean; highContrast: boolean; fontSize: string; }; /** * Use notification settings (memoized) */ export declare function useNotificationSettings(): { notificationsEnabled: boolean; soundEnabled: boolean; desktopNotifications: boolean; }; /** * Subscribe to store changes with callback (for side effects) * * @example * ```typescript * useStoreSubscription( * (state) => state.locale, * (newLocale, oldLocale) => { * console.log(`Locale changed from ${oldLocale} to ${newLocale}`); * } * ); * ``` */ export declare function useStoreSubscription(selector: StoreSelector, callback: (value: T, prevValue: T) => void, options?: { fireImmediately?: boolean; }): void; /** * Debounced state selector * * @example * ```typescript * const debouncedSearch = useDebouncedState( * (state) => state.searchQuery, * 300 * ); * ``` */ export declare function useDebouncedState(selector: StoreSelector, delay?: number): T; /** * Get previous value of a selector * * @example * ```typescript * const currentCount = useStore((s) => s.count); * const previousCount = usePreviousState((s) => s.count); * ``` */ export declare function usePreviousState(selector: StoreSelector): T | undefined; /** * Track if value has changed since component mounted * * @example * ```typescript * const { value, hasChanged, changeCount } = useStateChange((s) => s.count); * ``` */ export declare function useStateChange(selector: StoreSelector): { value: T; initialValue: T; hasChanged: boolean; changeCount: number; }; /** * Wait for store hydration before rendering * * @example * ```typescript * function App() { * const { hasHydrated, isHydrating } = useHydration(); * * if (isHydrating) { * return ; * } * * return ; * } * ``` */ export declare function useHydration(): { hasHydrated: boolean; isHydrating: boolean; };