import type { Config } from '../config/schema.js'; import type { GatewayBindMode } from '../config/schema.js'; export type MobilePairCandidateKind = 'lan' | 'tunnel' | 'reverse-proxy'; export type MobilePairBlockReason = 'GATEWAY_LOOPBACK_ONLY' | 'NO_REACHABLE_URL'; export type MobilePairCandidate = { kind: MobilePairCandidateKind; url: string; label?: string; reachable: boolean; note?: string; }; export type MobilePairContext = { port: number; bindMode: GatewayBindMode; listenHost: string; pairingReady: boolean; blockReason?: MobilePairBlockReason; candidates: MobilePairCandidate[]; recommended: { mode: MobilePairCandidateKind | null; url: string | null; }; /** Ordered URLs for mobile clients (LAN first when available, then tunnel). */ connectUrls: string[]; }; export declare function buildMobilePairContext(params: { config: Config; tunnelPublicUrl?: string | null; tunnelConnected?: boolean; /** * Optional override for `gateway.publicUrl`. Falls back to the configured * value when omitted; useful for transient candidates (e.g. UI auto-detect * from `window.location.origin` before the user persists the value). */ reverseProxyPublicUrl?: string | null; }): MobilePairContext;