import { Socket } from 'socket.io-client';
export interface SocketSubscription {
    /** Server-room join event.  Omit when server-side subscription is explicit (e.g. requestToken). */
    subscribeEmit?: string;
    subscribePayload?: object;
    /** Server-room leave event. */
    unsubscribeEmit: string;
    unsubscribePayload: object;
    /** Pairs of socket event name + the exact handler reference used with socket.on(). */
    bindings: Array<{
        event: string;
        handler: (...args: any[]) => void;
    }>;
}
export declare abstract class SocketIoBaseEventListener {
    protected readonly socket: Socket;
    private readonly subs;
    private readonly onReconnect;
    constructor(socket: Socket);
    /**
     * Register a subscription under `key`.
     * If a subscription with the same key already exists it is cleanly removed first
     * (deduplication — safe to call on every render / effect re-run).
     */
    protected register(key: string, sub: SocketSubscription): void;
    /**
     * Remove a subscription: calls socket.off() with the exact stored handler
     * references and emits the server-side unsubscribe event.
     */
    protected remove(key: string): void;
    /**
     * Update the reconnect payload for an existing subscription.
     * Use this when the server-side subscription is triggered by an explicit call
     * after the initial register() (e.g. requestToken), so that reconnect can
     * re-emit it automatically.
     */
    protected setReconnectEmit(key: string, subscribeEmit: string, subscribePayload: object): void;
    /**
     * Remove all active subscriptions and the reconnect handler.
     * Call when the listener itself is no longer needed (e.g. module teardown).
     */
    destroy(): void;
}
