import { StreamChat } from 'stream-chat'; import type { ClientUser, DeepPartial, InstanceConfigTree, TokenOrProvider } from 'stream-chat'; /** * Creates a `StreamChat` client and connects the user. Unmounting disconnects it; a change of * `apiKey`, `tokenOrProvider` or `userData.id` disconnects it and creates a new client. * * @param params.apiKey - Stream API key. * @param params.config - Client configuration, the tree `client.config.set()` takes. Read only on * the first render. * @param params.tokenOrProvider - Token or token provider of the user. Compared by reference, so * keep it stable across renders. * @param params.userData - User to connect. Changes other than `userData.id` are ignored. * @returns The client once the user is connected, null before that. */ export declare const useCreateChatClient: ({ apiKey, config, tokenOrProvider, userData, }: { apiKey: string; tokenOrProvider: TokenOrProvider; userData: ClientUser; config?: DeepPartial; }) => StreamChat | null; //# sourceMappingURL=useCreateChatClient.d.ts.map