import { ItemDescriptor } from "../../pageModel";
import { EditorMode } from "../editContext";
import type { EditOperation, EditSession, FieldDescriptor } from "../../../types";
export declare function useSocketMessageHandler(deps: {
    sessionId: string;
    mode: EditorMode;
    setWebSocketMessages: React.Dispatch<React.SetStateAction<Array<{
        id: string;
        timestamp: string;
        type: string;
        payload: any;
        rawMessage: string;
    }>>>;
    setActiveSessions: React.Dispatch<React.SetStateAction<EditSession[]>>;
    sendClientInfo: () => void;
    itemsRepository: any;
    currentItemDescriptor?: ItemDescriptor;
    loadItem: (item: ItemDescriptor, options?: {
        skipViewChange?: boolean;
    }) => Promise<any>;
    loadItemVersions: (options?: {
        descriptor?: ItemDescriptor;
        clearOnMissing?: boolean;
        preserveOnError?: boolean;
    }) => Promise<void>;
    setComments: React.Dispatch<React.SetStateAction<any[]>>;
    setSuggestedEdits: React.Dispatch<React.SetStateAction<any[]>>;
    setActiveFieldActions: React.Dispatch<React.SetStateAction<Array<{
        field: FieldDescriptor;
        message?: string;
        state: "running" | "success" | "error";
        label?: string;
    }>>>;
    setQuotaInfo: (q: any) => void;
    requestRefresh: (mode?: "immediate" | "delayed" | "waitForQuietPeriod") => void;
    currentItemRef: React.MutableRefObject<any>;
    addRecentEdit: (edit: any) => void;
    socketMessageListeners: React.MutableRefObject<Set<(data: any) => void>>;
    isItemUsedInCurrentPage: (item: ItemDescriptor) => boolean;
    updateOperationInHistory?: (op: EditOperation) => void;
    markOperationComplete?: (operationId: string) => void;
}): (event: any) => Promise<void>;
