export interface UseCountdownOptions { /** Begin counting down on mount. Default `true`. */ autoStart?: boolean; /** Called exactly once when the countdown reaches zero. */ onElapsed?: () => void; } export interface UseCountdownReturn { /** Whole seconds remaining; counts down to 0. */ remaining: number; /** Whether the countdown is actively ticking. */ isRunning: boolean; /** (Re)start from the full duration. */ start: () => void; /** Stop and reset to the full duration without firing `onElapsed`. */ reset: () => void; } /** * A pure, render-friendly seconds countdown. It owns no side effects — when * it reaches zero it calls `onElapsed` and the CONSUMER decides what to do * (close the tab, redirect, …). Same "no I/O" contract as `useSigningSession`. * * `onElapsed` is read through a ref, so changing the callback doesn't restart * the timer. SSR-safe: the timer only ticks inside an effect (client-only). * * @example * const { remaining } = useCountdown(10, { * onElapsed: () => { * window.close(); // best-effort — blocked for user-opened tabs * window.location.assign('https://www.alfadocs.com'); // fallback * }, * }); */ export declare function useCountdown(seconds: number, options?: UseCountdownOptions): UseCountdownReturn; //# sourceMappingURL=use-countdown.d.ts.map