/**
 * MultiplayerTransport — abstract transport layer for game multiplayer.
 *
 * Multiple implementations can be plugged in:
 *  - LocalTransport  (in-memory, couch co-op / testing)
 *  - SignalRTransport (real-time via ASP.NET SignalR)
 *  - WebRTCTransport  (peer-to-peer via PeerManager from ./network)
 *
 * For raw WebRTC, see PeerManager in network/Networking.ts.
 */
export type TransportState = "disconnected" | "connecting" | "connected" | "reconnecting";
export interface TransportMessage {
    type: string;
    payload: unknown;
    timestamp: number;
    senderId?: string;
}
export interface IMultiplayerTransport {
    readonly state: TransportState;
    connect(url: string, options?: Record<string, unknown>): Promise<void>;
    disconnect(): void;
    send(msg: TransportMessage): void;
    on(type: string, handler: (msg: TransportMessage) => void): void;
    off(type: string, handler: (msg: TransportMessage) => void): void;
    onStateChange(handler: (state: TransportState) => void): void;
}
export declare class LocalTransport implements IMultiplayerTransport {
    state: TransportState;
    private bus;
    private stateListeners;
    connect(): Promise<void>;
    disconnect(): void;
    send(msg: TransportMessage): void;
    on(type: string, handler: (msg: TransportMessage) => void): void;
    off(type: string, handler: (msg: TransportMessage) => void): void;
    onStateChange(handler: (state: TransportState) => void): void;
    private setState;
}
/**
 * SignalR-based transport.
 *
 * Requires `@microsoft/signalr` to be installed as a peer dependency.
 * Connection is established to `url` (e.g. `/hubs/game`).
 *
 * Hub server methods expected:
 *   CreateRoom, JoinRoom, LeaveRoom, SendGameMessage,
 *   StartMatchmaking, CancelMatchmaking
 *
 * Client-invoked events:
 *   GameMessage, RoomJoined, RoomLeft, PlayerJoined, PlayerLeft,
 *   MatchFound, Error
 */
export declare class SignalRTransport implements IMultiplayerTransport {
    state: TransportState;
    private connection;
    private bus;
    private stateListeners;
    private tokenFactory?;
    constructor(options?: {
        accessTokenFactory?: () => string | Promise<string>;
    });
    connect(url: string): Promise<void>;
    disconnect(): void;
    send(msg: TransportMessage): void;
    /** Hub server invocations */
    invoke(method: string, ...args: unknown[]): Promise<unknown>;
    on(type: string, handler: (msg: TransportMessage) => void): void;
    off(type: string, handler: (msg: TransportMessage) => void): void;
    onStateChange(handler: (state: TransportState) => void): void;
    private setState;
}
