import { type SupportChatInboxConfig } from './boot'; import type { SupportChatBridge } from './types'; /** * Page-level inbox for the site's support-chat vendor (BUG-1789078665). * * The handoff card (`adaptive-chatbot:leave-a-message`) owns the thread * while it is mounted and listening. Every other moment — the vendor's own * proactive trigger firing before anyone asked for a human, a reply landing * after navigation tore the card down — a team message would otherwise * vanish behind a hidden vendor bubble. This listener, wired once at * chat-bar boot, catches those messages and: * * 1. hands them to a mounted card that is not yet listening; * 2. otherwise writes them into the SAME persisted thread the card * hydrates from, and announces them through the canvas with the * workspace's words and the message itself as the body; * 3. on tap, mounts the workspace's leave-a-message template locally, * opened on the thread, so the visitor reads and replies in place. */ export declare const LEAVE_A_MESSAGE_WIDGET_ID = "adaptive-chatbot:leave-a-message"; /** Instance id of the locally mounted thread card. */ export declare const SUPPORT_CHAT_INBOX_INSTANCE_ID = "supportchat-inbox"; export interface SupportChatInboxRuntime { events: { publish: (name: string, props?: Record) => void; subscribe?: (filter: { names?: string[]; }, cb: (e: { name: string; props?: Record; }) => void) => () => void; }; state?: { ns?: (namespace: string) => { get: (key: string) => unknown; set: (key: string, value: unknown) => void; }; }; } export interface SupportChatInboxOptions { bridge: SupportChatBridge; inbox: SupportChatInboxConfig | undefined; runtime: SupportChatInboxRuntime | undefined; /** The chat-bar's `uiTemplates` block — where the leave-a-message * template's slot and `default_widget_props` come from. */ uiTemplates: Record | undefined; } /** * Wire the inbox for this page. Idempotent per page: a second chat-bar * mount (SPA re-render) reuses the first wiring. */ export declare function wireSupportChatInbox(opts: SupportChatInboxOptions): () => void; /** Has this page already wired its inbox? (chat-bar mounts are per-surface). */ export declare function isSupportChatInboxWired(): boolean; /** Test seam: tear down the page's inbox wiring. */ export declare function _resetSupportChatInboxForTests(): void; //# sourceMappingURL=inbox.d.ts.map