import type { ITransportAdapter, TransportHandler, IWireTopicInfo } from '../engine/remoting/ITransportAdapter.js';
/**
 * Switch listener callback type.
 */
type SwitchListener = (newTransport: ITransportAdapter) => void;
/**
 * TransportProxy - Proxy that enables runtime transport switching.
 *
 * Implements ITransportAdapter and delegates to an underlying transport.
 * Tracks all subscriptions so they can be migrated when switching transports.
 *
 * Usage:
 * ```typescript
 * const nats = new NatsTransport({ ... });
 * const proxy = new TransportProxy(nats);
 *
 * // Use proxy like any transport
 * proxy.subscribe('topic', handler);
 * proxy.publish('topic', data);
 *
 * // Later: hot-swap to different transport
 * const ws = new WebSocketTransport({ ... });
 * await proxy.switchTo(ws);
 * // All subscriptions migrated, handlers continue receiving
 * ```
 */
export declare class TransportProxy implements ITransportAdapter {
    private _currentTransport;
    private readonly _subscriptions;
    private readonly _switchListeners;
    private _switching;
    constructor(initialTransport: ITransportAdapter);
    /**
     * Topic prefix from underlying transport.
     */
    get topicPrefix(): string | undefined;
    /**
     * Forward root from underlying transport.
     */
    get root(): string;
    /** @deprecated Use `root`. */
    get realm(): string;
    /**
     * Forward principal from underlying transport (for MXTOPIC-1).
     */
    get principal(): string | undefined;
    /**
     * Forward execToken from underlying transport (for MXTOPIC-1).
     */
    get execToken(): string | undefined;
    /**
     * Get the underlying transport client if the current transport exposes one.
     * Used for low-level operations like cross-root mailbox publishing.
     *
     * @returns The raw transport client, or undefined if not available
     */
    getUnderlyingClient(): unknown;
    disconnect(): Promise<void>;
    /**
     * Publish to current transport.
     */
    publish(topic: string, payload?: unknown): void;
    /**
     * Subscribe via current transport, tracking for migration.
     */
    subscribe(topic: string, handler: TransportHandler): () => void;
    /**
     * Get wire topic info from underlying transport.
     */
    getWireTopicInfo?(topic: string): IWireTopicInfo;
    /**
     * Switch to a new transport, migrating all subscriptions.
     *
     * @param newTransport - The new transport to switch to
     * @throws If a switch is already in progress
     */
    switchTo(newTransport: ITransportAdapter): Promise<void>;
    /**
     * Register a listener for transport switches.
     *
     * @param listener - Called when transport is switched
     * @returns Function to remove the listener
     */
    onSwitch(listener: SwitchListener): () => void;
    /**
     * Get number of tracked subscriptions.
     */
    getSubscriptionCount(): number;
    /**
     * Get unique topics currently subscribed.
     */
    getTrackedTopics(): string[];
    /**
     * Check if a switch is in progress.
     */
    isSwitching(): boolean;
    /**
     * Get the type name of the underlying transport.
     */
    getTransportType(): string;
    /**
     * Get the underlying transport instance.
     */
    getUnderlyingTransport(): ITransportAdapter;
}
export {};
//# sourceMappingURL=TransportProxy.d.ts.map