import { type Dispatch, type SetStateAction } from "react";
import { type EditorSocketDiagnostics } from "../socketDiagnostics";
export type ConcurrentUserLimitError = {
    currentUsers: number;
    maxUsers: number;
    message: string;
};
export declare function useEditorWebSocket(params: {
    sessionId: string;
    onMessage: (event: MessageEvent<any>) => void;
    onOpen?: () => void;
    onError?: (error: Event) => void;
    onConcurrentUserLimit?: (error: ConcurrentUserLimitError) => void;
    onSessionRevoked?: () => void;
    connectSocket: (sessionId: string) => WebSocket;
    requestQuota?: () => void;
    sendClientInfo: () => Promise<void> | void;
    setSocketDiagnostics?: Dispatch<SetStateAction<EditorSocketDiagnostics>>;
}): {
    readonly socketRef: import("react").RefObject<WebSocket | null>;
};
