import type { ChatMessage, DataPublishOptions, LocalParticipant, Participant, Room } from '@cc-livekit/livekit-client'; import { Observable } from 'rxjs'; export declare const DataTopic: { readonly CHAT: "lk-chat-topic"; readonly CHAT_UPDATE: "lk-chat-update-topic"; }; /** Publish data from the LocalParticipant. */ export declare function sendMessage(localParticipant: LocalParticipant, payload: Uint8Array, options?: DataPublishOptions): Promise; export interface BaseDataMessage { topic?: T; payload: Uint8Array; } export interface ReceivedDataMessage extends BaseDataMessage { from?: Participant; } export declare function setupDataMessageHandler(room: Room, topic?: T | [T, ...T[]], onMessage?: (msg: ReceivedDataMessage) => void): { messageObservable: Observable<{ payload: Uint8Array; topic: T; from: import("@cc-livekit/livekit-client").RemoteParticipant | undefined; }>; isSendingObservable: Observable; send: (payload: Uint8Array, options?: DataPublishOptions) => Promise; }; export declare function setupChatMessageHandler(room: Room): { chatObservable: Observable<[message: ChatMessage, participant?: LocalParticipant | import("@cc-livekit/livekit-client").RemoteParticipant | undefined]>; send: (text: string) => Promise; edit: (text: string, originalMsg: ChatMessage) => Promise<{ readonly message: string; readonly editTimestamp: number; readonly id: string; readonly timestamp: number; readonly attachedFiles?: Array; }>; }; //# sourceMappingURL=dataChannel.d.ts.map