import type { SupportChatBridge } from './types'; export interface SupportChatConfig { vendor: string; suppressNative?: boolean; /** LeadConnector / GoHighLevel: the chat widget id from the site's embed * (`data-widget-id`). Required for vendor 'leadconnector'. */ widgetId?: string; /** * Where a team message lands when NO handoff card is on the page yet * (the vendor's own proactive triggers, or a reply after the card was * torn down by navigation). Config-authored words, same rule as every * other visitor-facing string: absence is the opt-out. */ inbox?: SupportChatInboxConfig; } export interface SupportChatInboxConfig { /** Heading of the thread card we open for the message. */ title: string; /** Title of the announcement; its body is the message itself. */ toastTitle: string; } /** How often the watch re-checks for a vendor SDK that was absent at boot. */ export declare const SUPPORT_CHAT_WATCH_TICK_MS = 500; /** How long the watch keeps checking before it gives up on the vendor. */ export declare const SUPPORT_CHAT_WATCH_MAX_MS: number; /** * Resolve the config-named vendor bridge at chat boot. An unknown vendor * (or a misconfigured one) logs (supportChat.bridge: prefix) and returns * undefined — the concierge never blocks on a third-party chat. * * A KNOWN vendor whose SDK is not on the page yet still returns its bridge * (BUG-1789078665): hosts running WP Rocket's "delay JavaScript" hold Crisp * back until the visitor's first click or scroll, seconds after we booted. * The bridge keeps answering `detect() === false` until the vendor lands; * a watch applies `hideNative` at that moment and wakes anyone waiting via * `onSupportChatReady`. */ export declare function bootSupportChat(cfg?: SupportChatConfig): SupportChatBridge | undefined; /** * Run `cb` once the bridge's vendor SDK is on the page: synchronously when * it already is, otherwise when the boot watch sees it land. Returns an * unsubscribe for callers that go away first (a card unmounting). */ export declare function onSupportChatReady(bridge: SupportChatBridge, cb: () => void): () => void; /** Test seam: clear every pending vendor watch. */ export declare function _resetSupportChatWatchForTests(): void; //# sourceMappingURL=boot.d.ts.map