import { getSuggestedAction, NetworkQuality, NetworkStatus } from '../utils/networkStatus'; /** * Hook to monitor network online/offline status */ export declare function useOnlineStatus(): boolean; /** * Hook to get full network status */ export declare function useNetworkStatus(): NetworkStatus; /** * Hook to monitor network quality */ export declare function useNetworkQuality(): NetworkQuality; /** * Hook to get suggested actions based on network quality */ export declare function useNetworkSuggestions(): ReturnType; /** * Hook to check if connection is slow */ export declare function useSlowConnection(): boolean; /** * Hook options for offline behavior */ export interface UseOfflineFallbackOptions { /** Fallback value when offline */ fallbackValue: T; /** Whether to show notification when offline */ showNotification?: boolean; /** Custom offline message */ offlineMessage?: string; } /** * Hook to provide fallback values when offline */ export declare function useOfflineFallback(value: T, options: UseOfflineFallbackOptions): { value: T; isOffline: boolean; isFallback: boolean; }; /** * Hook to execute callback when coming back online */ export declare function useOnReconnect(callback: () => void): void; /** * Hook to wait for online status */ export declare function useWaitForOnline(): { isOnline: boolean; waitForOnline: (timeout?: number) => Promise; }; /** * Hook for network-aware data fetching */ export interface UseNetworkAwareFetchOptions { /** Minimum quality required to fetch */ minQuality?: NetworkQuality; /** Whether to retry on reconnect */ retryOnReconnect?: boolean; /** Custom fetch function */ fetchFn?: () => Promise; } /** * Hook result for network-aware fetch */ export interface UseNetworkAwareFetchResult { canFetch: boolean; quality: NetworkQuality; isOnline: boolean; suggestions: ReturnType; refetchOnReconnect: () => void; } /** * Hook to manage network-aware fetching */ export declare function useNetworkAwareFetch(options?: UseNetworkAwareFetchOptions): UseNetworkAwareFetchResult; /** * Hook to show offline indicator */ export declare function useOfflineIndicator(): { showIndicator: boolean; message: string; quality: NetworkQuality; }; /** * Hook to track connection changes */ export declare function useConnectionTracker(): { changes: Array<{ online: boolean; timestamp: number; }>; disconnectCount: number; lastDisconnect: number | null; avgOfflineDuration: number; };