import { type ReactNode } from 'react'; import type { StoreApi, UseBoundStore } from 'zustand'; import type { SettingsState } from './settingsStore.ts'; import type { ChatState } from './chatStore.ts'; export type SettingsStoreHook = UseBoundStore>; export type ChatStoreHook = UseBoundStore>; /** * Provides one createChat() instance's settings/chat stores to its React tree. Each mounted * instance gets its own stores (created in createChat.tsx) so multiple widgets on the same * page - e.g. a host's own floating widget alongside a page's embedded demo - never share * config, theme, or conversation state. * * `storageNamespace` is the same value the stores were created with, exposed here for the * component-local storage keys that don't live in a store (see useStorageNamespace). */ export declare function StoreProvider({ settingsStore, chatStore, storageNamespace, children, }: { settingsStore: SettingsStoreHook; chatStore: ChatStoreHook; storageNamespace?: string; children: ReactNode; }): import("react/jsx-runtime").JSX.Element; /** * This instance's storage namespace, for keys written outside the zustand stores. Pair it with * scopedKey() - a bare key would be shared with every other instance on the page. */ export declare function useStorageNamespace(): string | undefined; export declare function useSettingsStore(): SettingsState; export declare function useSettingsStore(selector: (state: SettingsState) => T): T; export declare function useChatStore(): ChatState; export declare function useChatStore(selector: (state: ChatState) => T): T; /** Imperative access (outside render, e.g. inside a callback) to the current chat store. */ export declare function useChatStoreApi(): ChatStoreHook;