import { ChatOptions, ReceivedChatMessage } from '@livekit/components-core'; import { Room } from 'livekit-client'; /** * The `useChat` hook provides chat functionality for a LiveKit room. * * @remarks * Message history is not persisted and will be lost if the component is refreshed. * You may want to persist message history in the browser, a cache or a database. * * @returns An object containing: * - `chatMessages` - Array of received chat messages * - `send` - Function to send a new message * - `isSending` - Boolean indicating if a message is currently being sent * * @example * ```tsx * function ChatComponent() { * const { chatMessages, send, isSending } = useChat(); * * return ( *
* {chatMessages.map((msg) => ( *
* {msg.from?.identity}: {msg.message} *
* ))} * *
* ); * } * ``` * @public */ export declare function useChat(options?: ChatOptions & { room?: Room; }): { send: (message: string, options?: import('livekit-client').SendTextOptions) => Promise; chatMessages: ReceivedChatMessage[]; isSending: boolean; }; //# sourceMappingURL=useChat.d.ts.map