import React, { PropsWithChildren } from 'react'; import type { AppSettingsAPIResponse, Channel, Mute } from 'open-chat-js'; import type { ChatProps } from '../components/Chat/Chat'; import type { DefaultStreamChatGenerics, UnknownType } from '../types/types'; import type { ChannelsQueryState } from '../components/Chat/hooks/useChannelsQueryState'; type CSSClasses = 'chat' | 'chatContainer' | 'channel' | 'channelList' | 'message' | 'messageList' | 'thread' | 'threadList' | 'virtualMessage' | 'virtualizedMessageList'; export type CustomClasses = Partial>; type ChannelCID = string; export type ThemeVersion = '1' | '2'; export type ChatContextValue = { /** * Indicates, whether a channels query has been triggered within ChannelList by its channels pagination controller. */ channelsQueryState: ChannelsQueryState; closeMobileNav: () => void; getAppSettings: () => Promise> | null; latestMessageDatesByChannels: Record; mutes: Array>; openMobileNav: () => void; /** * Sets active channel to be rendered within Channel component. * @param newChannel * @param watchers * @param event */ setActiveChannel: (newChannel?: Channel, watchers?: { limit?: number; offset?: number; }, event?: React.BaseSyntheticEvent) => void; /** * Allows to opt out of the use of legacy CSS (version "1") and opt into the use of the latest SDK's CSS (version "2"). */ themeVersion: ThemeVersion; useImageFlagEmojisOnWindows: boolean; /** * Active channel used to render the contents of the Channel component. */ channel?: Channel; /** * Object through which custom classes can be set for main container components of the SDK. */ customClasses?: CustomClasses; navOpen?: boolean; } & Required, 'theme' | 'client'>>; export declare const ChatContext: React.Context | undefined>; export declare const ChatProvider: ({ children, value, }: React.PropsWithChildren<{ value: ChatContextValue; }>) => React.JSX.Element; export declare const useChatContext: (componentName?: string) => ChatContextValue; /** * Typescript currently does not support partial inference so if ChatContext * typing is desired while using the HOC withChatContext the Props for the * wrapped component must be provided as the first generic. */ export declare const withChatContext:

(Component: React.ComponentType

) => { (props: Omit): React.JSX.Element; displayName: string; }; export {}; //# sourceMappingURL=ChatContext.d.ts.map