import type { NetworkStatusCallback } from '@plyaz/types/api'; /** * Network status monitor */ declare class NetworkStatusMonitor { private callbacks; private isMonitoring; /** * Check if currently online * * @returns True if online */ isOnline(): boolean; /** * Check if currently offline * * @returns True if offline */ isOffline(): boolean; /** * Subscribe to network status changes * * @param callback - Function to call on status change * @returns Unsubscribe function * * @example * const unsubscribe = networkStatus.subscribe(online => { * console.log('Network status:', online ? 'online' : 'offline'); * }); * // Later: unsubscribe(); */ subscribe(callback: NetworkStatusCallback): () => void; /** * Start monitoring network status */ private startMonitoring; /** * Stop monitoring network status */ private stopMonitoring; private handleOnline; private handleOffline; private notifyCallbacks; } export declare const networkStatus: NetworkStatusMonitor; /** * Wait for online status * * @returns Promise that resolves when online * * @example * await waitForOnline(); * console.log('Back online!'); */ export declare function waitForOnline(): Promise; /** * Execute callback when online * * @param callback - Function to execute when online * @returns Cleanup function */ export declare function onOnline(callback: () => void): () => void; /** * Execute callback when offline * * @param callback - Function to execute when offline * @returns Cleanup function */ export declare function onOffline(callback: () => void): () => void; export {}; //# sourceMappingURL=status.d.ts.map