import type { ResolvedShareUrl, ShareReachability } from './share-types.js';
export interface ShareUrlContext {
    gatewayHost: string;
    gatewayPort: number;
    /**
     * User-configured reverse-proxy origin (`gateway.publicUrl`), already
     * normalized to `${protocol}//${host}` (no trailing slash).
     *
     * When present, the gateway is publicly reachable at this URL even if the
     * built-in FRP tunnel is not running — file shares can be served at
     * `<publicUrl>/s/<token>` and site shares at the subpath fallback
     * `<publicUrl>/site/<token>/`.
     */
    reverseProxyPublicUrl?: string | null;
}
export declare function resolveShareUrl(token: string, ctx: ShareUrlContext): ResolvedShareUrl;
export declare function resolveReachabilityForList(ctx: ShareUrlContext): ShareReachability;
export interface SiteShareUrlContext extends ShareUrlContext {
    /** Token used as the `/site/:token/` subpath label. */
    token: string;
    /** Subdomain label used at `https://<label>.<publicHostSuffix>/` when an FRP tunnel is active. */
    subdomainLabel: string;
    /** From `siteShare.publicHostSuffix`. */
    publicHostSuffix: string;
}
export interface ResolvedSiteShareUrl {
    /** URL the recipient lands on. */
    shareUrl: string;
    /** URL for the auto-rendered site thumbnail. */
    thumbnailUrl: string;
    reachability: ShareReachability;
    reachabilityHint: string | null;
}
/**
 * Resolve the URL pair for a site share. Priority mirrors `resolveShareUrl`:
 *  1. FRP tunnel → wildcard subdomain on `<publicHostSuffix>`.
 *  2. Reverse-proxy `publicUrl` → `<publicUrl>/site/<token>/` subpath.
 *  3. Direct gateway bind → `http://<host>:<port>/site/<token>/`.
 */
export declare function resolveSiteShareUrl(ctx: SiteShareUrlContext): ResolvedSiteShareUrl;
