import { PrimitiveState } from '../utils/PrimitiveState'; import { WidgetCtx } from './widget.ctx'; export type ScreenU = /** A welcome screen to collect user data. Useful in public non-logged-in environments */ 'welcome' /** Show a list of the user's previous sessions */ | 'sessions' /** Self-explanatory */ | 'chat'; type RouterState = { screen: ScreenU; }; export declare class RouterCtx { private widget; state: PrimitiveState; private subscriptions; private disposed; private config; private contactCtx; private sessionCtx; private resetChat; /** * Whether a reload returns the visitor to the conversation they were in. * Off by default: the home screen is the sessions list. Embedders whose * widget is a continuous assistant (an empty panel beside a live * conversation reads as data loss) opt in via `router.restoreLastSession`. */ private readonly shouldRestoreLastSession; /** The stored pointer, until it is used or found unusable. */ private restorableSessionId; /** Has the (async) storage read settled? Automatic routing waits for it. */ private didReadStoredSession; constructor(widget: WidgetCtx); /** * Read the remembered conversation before any automatic routing runs. The * read is async (the storage adapter may be), and the sessions list can land * first — so routing is re-run once the pointer is known. */ private readStoredSession; private registerRoutingListener; /** * Every automatic route the sessions list can trigger, in one place so the * restore can re-run it once the stored pointer is known. */ private routeFromSessions; dispose: () => void; /** A multi-chat host owns navigation without resetting background sends. */ navigateConversation?: (sessionId?: string) => WidgetCtx | undefined; toSessionsScreen: () => void; /** * @param sessionId The ID of the session to open, or `undefined` if it is a new chat session */ toChatScreen: (sessionId?: string) => WidgetCtx | undefined; } export {}; //# sourceMappingURL=router.ctx.d.ts.map