import type { ConnectAttempt, ConnectTransport } from "./types.js"; /** Inject navigation so hosts own routing and this package needs no DOM globals. */ export type ConnectNavigation = { openPopup(url: string): { close(): void; readonly closed?: boolean | undefined; } | null; redirect(url: string): void; }; export declare class ConnectPopupClosedError extends Error { constructor(); } /** Invoke directly from a user gesture for popup mode. Persist the opaque * attempt ID in host-owned state before redirect mode, then recover/poll on * return. Neither URL parameters nor popup messages prove completion. */ export declare function authorizeConnectAttempt(transport: Pick, attempt: ConnectAttempt, navigation: ConnectNavigation, options: { mode: "popup" | "redirect"; signal?: AbortSignal; timeoutMs?: number; }): Promise;