import 'rollup-plugin-inject-process-env'; import { WidgetEnv } from "@xapp/stentor-chat-widget"; export interface RenderableConfigOptions { /** * True when `window.xaConfig.getConfig` is present. * * That callback hands ChatWidget the real config after mount (React Native, hosts that * resolve config asynchronously), so a config with no server URL is late rather than * broken and must still render. */ readonly hasAsyncConfigLoader?: boolean; } /** * Can this config produce a working widget? * * Issue #956: when config injection failed, the widget rendered anyway, ChatStore's * `generateKey` built `xappchat.${connection.serverUrl}` from an undefined URL, and the page * was left with a `xappchat.undefined` storage entry and a widget that pulsated without ever * connecting. A resolvable server URL is the one thing that has to be there. * * Deliberately no stricter than that. `accountKey` has an explicit "no key" branch in * `generateKey` and is optional by design, and `type` defaults downstream -- requiring * either would stop widgets that work today from rendering at all. */ export declare function isRenderableConfig(config?: WidgetEnv, options?: RenderableConfigOptions): boolean; /** * The resolved connection fields worth putting in the error log, so the console shows which * values the store would actually have used rather than the raw ones the reader can already * see on `window.xaConfig`. */ export declare function describeUnrenderableConfig(config?: WidgetEnv): { readonly serverUrl?: string; readonly accountKey?: string; readonly connectionType?: string; };