import { Observable } from 'lib0/observable';
import { type ISession, type IUserAttributes } from '../types';
import { SESSION_AUTO_CREATED, SESSION_STOPPED_EVENT, REMOTE_SESSION_RECORDING_START, REMOTE_SESSION_RECORDING_STOP } from '../config';
export type SocketServiceEvents = typeof SESSION_STOPPED_EVENT | typeof SESSION_AUTO_CREATED | typeof REMOTE_SESSION_RECORDING_START | typeof REMOTE_SESSION_RECORDING_STOP;
export interface SocketServiceOptions {
    apiKey: string;
    socketUrl: string;
    keepAlive?: boolean;
    usePostMessageFallback?: boolean;
}
export declare class SocketService extends Observable<SocketServiceEvents> {
    private socket;
    private queue;
    private isConnecting;
    private isConnected;
    private attempts;
    private sessionId;
    private options;
    private usePostMessage;
    constructor();
    /**
     * Initialize the socket service
     * @param config - Socket service configuration
     */
    init(config: SocketServiceOptions): void;
    /**
     * Update the socket service configuration
     * @param config - Partial configuration to update
     */
    updateConfigs(config: Partial<SocketServiceOptions>): void;
    private _initConnection;
    private checkReconnectionAttempts;
    private sendViaPostMessage;
    private emitSocketEvent;
    private flushQueue;
    send(event: any): void;
    subscribeToSession(session: ISession): void;
    unsubscribeFromSession(stopSession?: boolean): void;
    setUser(userAttributes: IUserAttributes | undefined): void;
    close(): Promise<void>;
}
//# sourceMappingURL=socket.service.d.ts.map