import type { ChatgramConfig, WidgetState } from '../core/types'; import { EventEmitter } from '../core/events'; /** * The Modal class manages the entire widget UI lifecycle. * * Architecture: * - Uses Shadow DOM for CSS isolation * - Focus trap keeps Tab cycling within modal * - Scroll lock prevents body scrolling without layout shift * - Honeypot field catches bots * - Rate limiter prevents spam * - Anti-bot timing check * - Full ARIA attributes for screen readers * - Keyboard navigation (Escape to close, Tab to navigate, Enter to select) */ export declare class Modal { private config; private events; private rateLimiter; private hostEl; private shadow; private overlay; private modalEl; private bodyContainer; private isOpen; private state; private selectedCategory; private mountTime; private instanceId; private destroyFocusTrap; private boundEscapeHandler; private emailInput; private nameInput; private subjectInput; private messageInput; private honeypotInput; private charCountText; private charCountFill; private submitBtn; private categoryBtns; constructor(config: ChatgramConfig, events: EventEmitter); open(): void; close(): void; destroy(): void; updateConfig(newConfig: ChatgramConfig): void; updateTheme(theme: ChatgramConfig['theme']): void; getState(): WidgetState; isVisible(): boolean; private mount; private applyTheme; private buildHeader; private buildFormView; private buildField; private selectCategory; private updateCharCount; private validate; private showFieldError; private showTextareaError; private clearFieldError; private setState; private showStateView; private handleSubmit; }