export type NetworkState = { isConnected: boolean; isInternetReachable: boolean | null; type: 'wifi' | 'cellular' | 'ethernet' | 'bluetooth' | 'vpn' | 'none' | 'unknown'; }; export type NetworkStateListener = (state: NetworkState) => void; /** * Network status manager that detects online/offline status * Uses @react-native-community/netinfo for React Native or expo-network for Expo */ declare class NetworkStatusManager { private state; private listeners; private unsubscribe; private initialized; private netInfoModule; private expoNetworkModule; /** * Initialize network status monitoring * Call this during SDK initialization */ initialize(): Promise; /** * Initialize with @react-native-community/netinfo */ private initializeWithNetInfo; /** * Update state from NetInfo response */ private updateStateFromNetInfo; /** * Derived online-ness: connected AND internet not known-unreachable. Single source of * truth shared by isOnline() and the change-notification gating. */ private deriveOnline; /** * Map NetInfo type to our simplified type */ private mapNetInfoType; /** * Initialize with expo-network */ private initializeWithExpoNetwork; /** * Update state from expo-network response */ private updateStateFromExpoNetwork; /** * Map expo-network type to our simplified type */ private mapExpoNetworkType; /** * Poll expo-network for changes (since it doesn't have a listener API) */ private pollingInterval; private startExpoNetworkPolling; /** * Notify all listeners of state change */ private notifyListeners; /** * Get current network state */ getState(): NetworkState; /** * Check if device is currently online */ isOnline(): boolean; /** * Get current network type */ getNetworkType(): NetworkState['type']; /** * Subscribe to network state changes * Returns an unsubscribe function */ subscribe(listener: NetworkStateListener): () => void; /** * Refresh network state manually * Useful when returning from background */ refresh(): Promise; /** * Cleanup and stop monitoring */ destroy(): void; } export declare const networkStatusManager: NetworkStatusManager; export default networkStatusManager;