import { CellMasks, ConnectedMessage, CustomMessageData, LoadTableOptions, Message, OnesTable, OnesTableCustom, SheetRange, TableSidebarOptions, OnesTableHook, ToastInfo, GC, MetaMessageData } from '../../../../@ones-table/common';
import ReconnectingWebSocket, { ErrorEvent, CloseEvent } from 'reconnecting-websocket';
import { CommandSenderStatus } from './command-sender/commands-sender';
import { TableDocumentBase } from './table-document-base';
export declare class RealtimeTableDocument extends TableDocumentBase implements OnesTable {
    private ws;
    private connectMessage;
    private spread;
    private loadOptions;
    private version;
    private executingRemoteCommand;
    private remoteCursor;
    private reauthCounter;
    private debounceTimer;
    private masks;
    private formulaMask;
    private customs;
    private commandsSender;
    private currentCommand;
    private hooks;
    private metaData;
    constructor(ws: ReconnectingWebSocket, connectMessage: ConnectedMessage, spread: GC.Spread.Sheets.Workbook, loadOptions: LoadTableOptions);
    getMeta(name: string): string | undefined;
    setMeta(name: string, value: string): void;
    get options(): LoadTableOptions;
    getSettings(): import("@ones-table/common").OnesTableSettings;
    addHook(hook: OnesTableHook): void;
    getHooks(): OnesTableHook[];
    addCustom<T extends OnesTableCustom>(name: string, creator: () => T): T;
    getCustom<T>(name: string): T | undefined;
    setReadonly(readonly: boolean): void;
    readonly(): boolean;
    setCurrentCommand(command: string): void;
    getCurrentCommand(): string;
    cellMasks(): CellMasks;
    getUsers(): import("@ones-table/common").UserData[];
    getUserColor(userId: string): string;
    clientId(): string;
    workbook(): GC.Spread.Sheets.Workbook;
    user(): import("@ones-table/common").UserData;
    sendMessageToServer(message: Message): void;
    debounce(inner: () => void, ms?: number): void;
    broadcastCustomMessage(data: CustomMessageData): void;
    broadcastMetaMessage(data: MetaMessageData): void;
    handleSelectionChanged(sheetName: string, newSelections: SheetRange[]): void;
    handleWebsocketError: (event: ErrorEvent) => void;
    handleClose: (event: CloseEvent) => void;
    handleStatusChanged: (status: CommandSenderStatus) => void;
    handleActiveSheetChanged: () => void;
    destroy(): void;
    private nextVersion;
    private handleRemoteMessage;
    private handleLocalEvent;
    private handleLocalCommand;
    private handleError;
    private handleRemoteCommand;
    private handleCustomMessage;
    private handleMetaMessage;
    private handleReload;
    reauth(): Promise<string | null>;
    showSidebar(content: HTMLElement, options: TableSidebarOptions): void;
    showToast(options: ToastInfo): void;
    i18nt(key: string, args?: Record<string, string> | undefined): string;
    closeSidebar(): void;
    static sendConnectMessage(ws: ReconnectingWebSocket, token: string, kbId: string, docId: string): void;
    private setData;
    toExcel(): Promise<File>;
}
