/** * wSocket Support Widget * * Embeddable chat widget using Shadow DOM for CSS isolation. * No framework dependency — pure DOM manipulation for minimal bundle. * * Usage: * * * Or programmatic: * const widget = new SupportWidget({ serverUrl: '...', orgId: '...' }); * widget.mount(); */ import { type WidgetTheme } from './styles.js'; export interface SupportWidgetConfig { serverUrl: string; orgId: string; apiKey: string; theme?: Partial; locale?: string; position?: 'right' | 'left'; headerTitle?: string; preChatFields?: ('name' | 'email')[]; agentOnline?: boolean; } export declare class SupportWidget { private config; private theme; private strings; private host; private shadow; private bubble; private badge; private window; private prechatView; private chatView; private messageList; private typingIndicator; private textarea; private sendBtn; private inputArea; private closedBanner; private isOpen; private visitorId; private visitorName; private visitorEmail; private conversationId; private conversationClosed; private messages; private unreadCount; private ws; private reconnectTimer; private audioCtx; private isDragging; private dragStartX; private dragStartY; private windowX; private windowY; private hasDragMoved; private dragBound; private isResizing; private resizeStartX; private resizeStartY; private resizeStartW; private resizeStartH; private currentW; private currentH; private resizeBound; constructor(config: SupportWidgetConfig); mount(container?: HTMLElement): void; destroy(): void; private buildBubble; private buildWindow; private buildPrechat; private buildChatView; private toggle; private showChat; private autoGrow; private scrollToBottom; private updateBadge; private appendMessage; private formatMessage; private apiCall; private startConversation; private loadMessages; private loadKBSuggestions; private renderKBSuggestions; private sendMessage; private connectWs; private disconnectWs; private subscribeToConversation; private handleWsMessage; private showConversationClosed; private submitCSAT; private startNewConversationFlow; private showTyping; private initDrag; private onDrag; private endDrag; private initResize; private onResize; private endResize; private playNotificationSound; private loadSession; private saveSession; private generateVisitorId; } //# sourceMappingURL=widget.d.ts.map