/** * usePWAInstall.ts — React hook for universal-pwa. * * Wraps the InstallEngine with React state so components can * reactively re-render when the install status changes. * * Usage: * const { isInstallable, install, dismiss, status, platform } = usePWAInstall({ * appName: 'My App', * themeColor: '#6200ee', * }) */ import type { UniversalPWAConfig, InstallStatus, Platform } from '../types'; export interface UsePWAInstallReturn { /** Current install status */ status: InstallStatus; /** Detected browser/OS platform */ platform: Platform | null; /** True if the prompt can be shown right now */ isInstallable: boolean; /** True if the app is already installed */ isInstalled: boolean; /** True on iOS — use this to show manual instructions */ isIOS: boolean; /** Whether the engine has finished initializing */ isReady: boolean; /** * Trigger the install flow. * Returns the outcome: 'accepted' | 'dismissed' | 'ios' | 'unsupported' */ install: () => Promise<'accepted' | 'dismissed' | 'ios' | 'unsupported'>; /** Record that the user dismissed the prompt */ dismiss: () => void; /** Reset stored preferences (for dev/testing) */ reset: () => void; } export declare function usePWAInstall(config?: UniversalPWAConfig): UsePWAInstallReturn;