/**
 * Service Worker Registration Helper
 *
 * Handles registration, updates, and communication with the service worker.
 */
export interface ServiceWorkerStatus {
    isSupported: boolean;
    isRegistered: boolean;
    isOnline: boolean;
    registration: ServiceWorkerRegistration | null;
    updateAvailable: boolean;
}
type UpdateCallback = (registration: ServiceWorkerRegistration) => void;
type StatusChangeCallback = (status: ServiceWorkerStatus) => void;
/**
 * Check if service workers are supported
 */
export declare function isServiceWorkerSupported(): boolean;
/**
 * Get current service worker status
 */
export declare function getServiceWorkerStatus(): ServiceWorkerStatus;
/**
 * Register the service worker.
 * Defers registration until the page is fully loaded to avoid
 * interfering with chunk loading — especially in WebKit/Safari where
 * early SW registration can cause ChunkLoadError timeouts.
 */
export declare function registerServiceWorker(basePath?: string): Promise<ServiceWorkerRegistration | null>;
/**
 * Unregister the service worker
 */
export declare function unregisterServiceWorker(): Promise<boolean>;
/**
 * Skip waiting and activate new service worker immediately
 */
export declare function skipWaiting(): void;
/**
 * Clear all caches
 */
export declare function clearAllCaches(): void;
/**
 * Tell service worker we're running in Tauri
 */
export declare function setTauriMode(isTauri: boolean): void;
/**
 * Tell service worker about offline status (from Tauri)
 */
export declare function setOfflineStatus(isOffline: boolean): void;
/**
 * Request cache status from service worker
 */
export declare function getCacheStatus(): Promise<Record<string, number> | null>;
/**
 * Subscribe to service worker updates
 */
export declare function onUpdate(callback: UpdateCallback): () => void;
/**
 * Subscribe to status changes (online/offline, registration, updates)
 */
export declare function onStatusChange(callback: StatusChangeCallback): () => void;
/**
 * Setup online/offline listeners
 */
export declare function setupNetworkListeners(): () => void;
/**
 * Initialize service worker and network listeners
 * Call this once when app loads
 */
export declare function initServiceWorker(basePath?: string): Promise<ServiceWorkerStatus>;
export {};
