import BaseChannel from './Base'; type HandshakeAckMessage = { type: 'HandshakeAck'; version: string; id: string; cv: string; }; type FireAndForgetMessage = { type: 'Message'; id: string; target: string; content: string; cv: string; }; type TransactionStartMessage = { type: 'TransactionStart'; id: string; target: string; content: string; cv: string; }; type TransactionCompleteMessage = { type: 'TransactionComplete'; id: string; content: string; cv: string; }; type ReceiverCancelMessage = { type: 'ReceiverCancel'; id: string; content?: string; cv: string; }; type SenderCancelMessage = { type: 'SenderCancel'; id: string; content?: string; cv: string; }; type UnhandledTargetMessage = { type: 'Unhandled'; id: string; target: string; cv: string; }; type ErrorMessage = { type: 'Error'; id: string; content: string; cv: string; }; type AnyIncomingMessage = HandshakeAckMessage | FireAndForgetMessage | TransactionStartMessage | TransactionCompleteMessage | ReceiverCancelMessage | SenderCancelMessage | UnhandledTargetMessage | ErrorMessage; type PendingTransaction = { resolve: (value: string) => void; reject: (reason: any) => void; target: string; }; export default class MessageChannel extends BaseChannel { _handshakeReady: boolean; _cvPrefix: string; _cvCounter: number; _messageQueue: Array<{ target: string; data: any; }>; _openTransactions: Map; _incomingTransactionCancellationCallbacks: Map void) | undefined>; _clientInstallId: string; onOpen(event: any): void; onMessage(event: any): void; onClose(event: any): void; destroy(): void; sendMessage(path: string, data: any): void; sendTransaction(path: string, data: any): Promise; sendTransactionComplete(id: string, data: any): void; generateMessage(path: any, data: any): { type: string; content: string; id: string; target: any; cv: string; }; _onHandshakeAck(message: HandshakeAckMessage): void; _onFireAndForget(message: FireAndForgetMessage): void; _onTransactionStart(message: TransactionStartMessage): void; _onTransactionComplete(message: TransactionCompleteMessage): void; _onSenderCancel(message: SenderCancelMessage): void; _onReceiverCancel(message: ReceiverCancelMessage): void; _onUnhandled(message: UnhandledTargetMessage): void; _onError(message: ErrorMessage): void; _dispatchIncomingTarget({ target, id, content, isTransaction, completion, }: { target: string; id: string; content: string; isTransaction: boolean; completion?: { complete: (response: any) => void; cancel: (reason?: any) => void; setOnRemoteCancellation: (callback: () => void) => void; }; }): boolean; _sendUnhandled(message: FireAndForgetMessage | TransactionStartMessage): void; _sendError(id: string, error: unknown, cv: string): void; _getSupportedSystemUis(): number[]; _drainQueue(): void; _resetRuntimeState(): void; _parseIncomingMessage(event: any): AnyIncomingMessage | null; _decodeRawData(data: any): string; _parseContent(content: string): any; _stringifyContent(content: any): string; _newId(): string; _nextCv(): string; _incrementCv(cv: string): string; } export {}; //# sourceMappingURL=Message.d.ts.map