import { Core } from '../../../wasm/dist';
declare global {
    interface Window {
        Module: {
            TypeScriptWebSocketBridge?: TypeScriptWebSocketBridge;
            typescript_websocket_connect_request?: (connectionId: number, url: string, authDataJson: string) => void;
            typescript_websocket_disconnect_request?: (connectionId: number) => void;
            typescript_websocket_subscribe_event?: (connectionId: number, eventName: string) => void;
            typescript_websocket_send_ack?: (connectionId: number, ackId: number, responseData: string) => void;
            typescript_websocket_send_message?: (connectionId: number, eventName: string, data: string) => void;
        } & any;
    }
    var Module: {
        TypeScriptWebSocketBridge?: TypeScriptWebSocketBridge;
        typescript_websocket_connect_request?: (connectionId: number, url: string, authDataJson: string) => void;
        typescript_websocket_disconnect_request?: (connectionId: number) => void;
        typescript_websocket_subscribe_event?: (connectionId: number, eventName: string) => void;
        typescript_websocket_send_ack?: (connectionId: number, ackId: number, responseData: string) => void;
        typescript_websocket_send_message?: (connectionId: number, eventName: string, data: string) => void;
    } & any;
}
export declare class TypeScriptWebSocketBridge {
    private wasm;
    private static instance;
    private activeConnections;
    constructor(wasm: Core);
    /**
     * Initialize the WebSocket bridge (singleton pattern)
     */
    static initialize(wasm: Core): TypeScriptWebSocketBridge;
    /**
     * Clear the bridge and cleanup resources
     */
    static clear(): void;
    /**
     * Register bridge methods that C++ can call
     */
    private registerBridgeMethods;
    /**
     * Register methods in a specific Module context
     */
    private registerMethodsInContext;
    /**
     * Handle connect request from C++
     */
    private onConnectRequest;
    /**
     * Handle disconnect request from C++
     */
    private onDisconnectRequest;
    /**
     * Handle subscribe event request from C++
     */
    private onSubscribeEvent;
    /**
     * Handle send acknowledgment request from C++
     */
    private onSendAck;
    /**
     * Handle send message request from C++
     */
    private onSendMessage;
    /**
     * Notify C++ about connection status changes
     */
    notifyConnectionStatusChanged(connectionId: number, connected: boolean, errorMessage?: string): void;
    /**
     * Notify C++ about Socket.IO events
     */
    notifySocketIOEvent(connectionId: number, eventName: string, eventData: string, needsAck: boolean, ackId: number): void;
    /**
     * Notify C++ about Socket.IO errors
     */
    notifySocketIOError(connectionId: number, errorCode: number, errorMessage: string): void;
    /**
     * Clean up all resources
     */
    private cleanupResources;
    /**
     * Get connection info for debugging
     */
    getConnectionInfo(connectionId: number): any;
    /**
     * Get all active connections for debugging
     */
    getAllConnections(): any[];
}
//# sourceMappingURL=TypeScriptWebSocketBridge.d.ts.map