import { LitElement } from 'lit'; import '../sw-call-media.js'; import '../sw-local-camera.js'; import '../sw-call-controls.js'; import '../UI/layout/sw-ui-call-layout.js'; import '../UI/layout/sw-ui-responsive-container.js'; import '../UI/layout/sw-ui-modal.js'; import '../UI/layout/sw-ui-background.js'; import '../UI/layout/sw-ui-content-drawer.js'; import '../UI/sw-ui-transcript-view.js'; /** * All-in-one call widget. Handles client initialisation, dialling, media, * controls and optional AI transcript — in either inline or modal modes. * * Composes `sw-ui-call-layout`, `sw-call-media`, `sw-local-camera`, * `sw-call-controls`, and `sw-ui-transcript-view` under the hood. * All child components are wired via Lit context — no manual plumbing needed. * * @prop {string} token - SignalWire SAT or embed token * @prop {string} host - Optional server host * @prop {string} destination - Call destination (address or resource) * @prop {boolean} modal - Render in a `` overlay * @prop {boolean} transcription - Show AI transcript panel * * @slot background - Background element (e.g. ``) * @slot (default) - Trigger element (click to dial, shown when idle) * * @fires sw-dial - When `dial()` is invoked. Detail: `{ destination }`. * @fires sw-call-ended - When the call reaches a terminal state (user hangup, remote disconnect, or failure). Detail: `{ status }`. * @fires sw-display-content - From `display_content` user event. Detail: `DisplayContentPayload`. * @fires signalwire-address:event - Forwarded SignalWire custom user events. * * All inner events bubble. * * @method dial() - Initiate call * @method hangup() - End active call */ export declare class SwCallWidget extends LitElement { static styles: import("lit").CSSResult[]; token: string; host: string; destination: string; modal: boolean; transcription: boolean; allowIncomingCalls: boolean; audioOnly: boolean; /** * Custom variables sent with the Verto invite as a JSON object. * * The widget always advertises `capabilities.display_content` and * `metadata.widget.opened_at` so the agent can detect that the caller * supports the content drawer; user-supplied keys are merged in and win * on shallow conflict. * * Invalid JSON is logged and ignored — the call still dials. * * @example * */ userVariables: string; /** * Skip auto-injecting the SignalWire `theme.css` design-token stylesheet. * Set this when the host page already loads `@signalwire/web-components/theme.css` * or a custom theme written against the same DTCG token names. */ disableAutoTheme: boolean; /** * Skip auto-loading the SignalWire brand fonts (Lexend, Instrument Sans, * JetBrains Mono) from Google Fonts. Set this when fonts are self-hosted * or loaded elsewhere. */ disableAutoFonts: boolean; private _call; private _connecting; private _hasLayoutLayers; private _drawer; private _callState; private _devices; private _transcript; private _userEventCtrl; private _incomingCalls; private _client; private _subs; private _pendingIncoming; connectedCallback(): void; protected updated(changed: Map): void; disconnectedCallback(): void; private _destroyClient; private _refreshClient; dial(): Promise; hangup(): Promise; private _connectIncomingCalls; private _handleIncomingCall; private _wireCall; private _onDisplayContent; private _onDrawerClose; private _unwireCall; private _onSlotChange; private _onHangUp; private _onModalClose; private _onFullscreenToggle; private _onTranscriptToggle; render(): import("lit-html").TemplateResult; } declare global { interface HTMLElementTagNameMap { 'sw-call-widget': SwCallWidget; } } //# sourceMappingURL=sw-call-widget.d.ts.map