import type { IRemoteIngressStatus } from '../../dist_ts_interfaces/data/remoteingress.js';
import type { RemoteIngressManager } from './classes.remoteingress-manager.js';
export interface ITunnelManagerConfig {
    tunnelPort?: number;
    targetHost?: string;
    tls?: {
        certPem?: string;
        keyPem?: string;
    };
    performance?: import('../../dist_ts_interfaces/data/remoteingress.js').IRemoteIngressPerformanceConfig;
}
/**
 * Manages the RemoteIngressHub instance and tracks connected edge statuses.
 */
export declare class TunnelManager {
    private hub;
    private manager;
    private config;
    private edgeStatuses;
    private reconcileInterval;
    private syncChain;
    constructor(manager: RemoteIngressManager, config?: ITunnelManagerConfig);
    /**
     * Start the tunnel hub and load allowed edges.
     */
    start(): Promise<void>;
    /**
     * Stop the tunnel hub.
     */
    stop(): Promise<void>;
    /**
     * Reconcile TS-side edge statuses with the authoritative Rust hub status.
     * Overwrites event-derived activeTunnels with the real activeStreams count.
     */
    private reconcile;
    /**
     * Sync allowed edges from the manager to the hub.
     * Call this after creating/deleting/updating edges.
     */
    syncAllowedEdges(): Promise<void>;
    private applyRustStatus;
    /**
     * Get runtime statuses for all known edges.
     */
    getEdgeStatuses(): IRemoteIngressStatus[];
    /**
     * Get status for a specific edge.
     */
    getEdgeStatus(edgeId: string): IRemoteIngressStatus | undefined;
    /**
     * Get the count of connected edges.
     */
    getConnectedCount(): number;
    /**
     * Get the public IPs of all connected edges.
     */
    getConnectedEdgeIps(): string[];
    /**
     * Get the total number of active tunnels across all edges.
     */
    getTotalActiveTunnels(): number;
}
