import { Message } from '../../../../../@ones-table/common';
import { TypedEmitter } from 'tiny-typed-emitter';
import ReconnectingWebSocket, { ErrorEvent, CloseEvent } from 'reconnecting-websocket';
export type CommandSenderStatus = 'dirty' | 'clean';
export interface CommandSenderEvents {
    statusChanged: (status: CommandSenderStatus) => void;
}
export default class CommandsSender extends TypedEmitter<CommandSenderEvents> {
    private ws;
    private unprocessedMessageQueue;
    private sendingMessageQueue;
    private debounceTimer;
    private status;
    private currentSender;
    constructor(ws: ReconnectingWebSocket);
    addCommand(message: Message): void;
    private debounce;
    private send;
    private setStatus;
    handleMessage(event: MessageEvent): void;
    handleError(error: ErrorEvent): void;
    handleClose(event: CloseEvent): void;
    clear(): Message[];
}
