UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

25 lines (24 loc) 1.02 kB
import type { TranslationContextValue } from '../../../context/TranslationContext'; import type { SupportedTranslations } from '../../../i18n'; import { Streami18n } from '../../../i18n'; import type { AppSettingsAPIResponse, Channel, Mute, StreamChat } from 'stream-chat'; export type UseChatParams = { client: StreamChat; defaultLanguage?: SupportedTranslations; i18nInstance?: Streami18n; initialNavOpen?: boolean; }; export declare const useChat: ({ client, defaultLanguage, i18nInstance, initialNavOpen, }: UseChatParams) => { channel: Channel | undefined; closeMobileNav: () => void; getAppSettings: () => Promise<AppSettingsAPIResponse>; latestMessageDatesByChannels: {}; mutes: Mute[]; navOpen: boolean | undefined; openMobileNav: () => NodeJS.Timeout; setActiveChannel: (activeChannel?: Channel, watchers?: { limit?: number; offset?: number; }, event?: React.BaseSyntheticEvent) => Promise<void>; translators: TranslationContextValue; };