interface Member { id?: string; name: string; phone: string; avatar: string; department?: string; title?: string; skills?: string[]; isOnline?: boolean; } interface BusinessInfo { name: string; tagline?: string; logo?: string; description?: string; } interface BusinessHours { enabled: boolean; timezone?: string; schedule: { [day: string]: { open: string; close: string; } | null; }; offlineMessage?: string; } interface Department { id: string; name: string; description?: string; icon?: string; members: Member[]; } interface QuickMessage { label: string; text: string; } interface QuickMessageCategory { category: string; messages: QuickMessage[]; } interface AnalyticsConfig { enabled: boolean; events?: { onWidgetOpen?: (data: any) => void; onMemberSelect?: (member: Member) => void; onMessageSent?: (member: Member, message: string) => void; onWidgetClose?: () => void; onLeadCapture?: (leadData: any) => void; }; trackingId?: string; } interface LocalizationConfig { language: string; translations: { headerTitle: string; headerDescription: string; messagePlaceholder: string; sendButton: string; offlineMessage: string; departmentSelector: string; nameLabel: string; emailLabel: string; phoneLabel: string; companyLabel: string; submitButton: string; backButton: string; selectMember: string; businessHours: string; quickMessages: string; }; } interface LeadCaptureField { required: boolean; placeholder: string; type?: "text" | "email" | "tel" | "url"; } interface LeadCaptureConfig { enabled: boolean; showBefore?: "member-selection" | "message-send" | "both"; fields: { name?: LeadCaptureField; email?: LeadCaptureField; phone?: LeadCaptureField; company?: LeadCaptureField; }; onLeadCapture?: (leadData: any) => void; } interface ThemeConfig { brandColors?: { primary: string; secondary: string; accent: string; }; typography?: { fontFamily: string; fontSize: string; }; } interface WidgetConfig { styles?: { button?: { backgroundColor?: string; color?: string; }; }; members?: Member[]; businessInfo?: BusinessInfo; businessHours?: BusinessHours; departments?: Department[]; quickMessages?: QuickMessageCategory[]; analytics?: AnalyticsConfig; localization?: LocalizationConfig; leadCapture?: LeadCaptureConfig; theme?: ThemeConfig; position?: "bottom-right" | "bottom-left"; showBranding?: boolean; autoOpen?: boolean; welcomeMessage?: string; } declare class WhatsAppWidget { private config; private mountElement; private isOpen; private currentView; private selectedDepartment; private leadData; private translations; constructor(widgetMountElId: string, config: WidgetConfig); private mergeWithDefaults; private getDefaultTranslations; private init; private applyPositioning; private applyTheme; private createButton; private toggleWidget; private openWidget; private closeWidget; private showLeadCaptureForm; private getLeadCaptureFormHTML; private attachLeadCaptureListeners; private showMainView; private showDepartments; private showMembers; private selectMember; private createChatInputGroup; private createChatContainer; private createHeader; private isBusinessHours; private trackEvent; private showBranding; } declare function whatsappWidget(widgetMountElId: string, config: WidgetConfig): WhatsAppWidget; declare global { interface Window { whatsappWidget: typeof whatsappWidget; } } export default whatsappWidget;