import { FeedbackWidget } from './feedback-widget'; import type { InitOptions, AttachOptions, ColorScheme } from './types'; /** * CoolhandFeedback manages the overall feedback system * Handles initialization, auto-attachment, and widget lifecycle */ export declare class CoolhandFeedback { private apiKey; private clientUniqueId; private widgetStyle; private colorScheme; private explanationSample; private fingerprintId; private autoHighlight; private placementVertical; private placementHorizontal; private instances; private attachedElements; private observer; private isAutoAttaching; /** * Initialize the feedback system with an API key * @param apiKey - Your Coolhand API key * @param options - Configuration options * @returns true if initialization succeeded, false otherwise */ init(apiKey: string, options?: InitOptions): boolean; /** * Destroy all existing widgets (used when re-initializing) */ private destroyAllWidgets; /** * Enable automatic attachment to elements with coolhand-feedback attribute */ private enableAutoAttachment; /** * Attach to all existing elements with the coolhand-feedback attribute */ private attachToExistingElements; /** * Attach to elements within a node (for mutation observer) */ private attachToElementsInNode; /** * Auto-attach to an element, parsing options from data attributes */ private autoAttachToElement; /** * Manually attach a feedback widget to an element * @param element - The HTML element to attach to * @param options - Configuration options for this widget * @returns The FeedbackWidget instance, or null on error */ attach(element: HTMLElement, options?: AttachOptions): FeedbackWidget | null; /** * Extract text content from an element * For input/textarea elements, extracts the value * For other elements, extracts textContent */ private extractText; /** * Detach a feedback widget from an element * @param element - The element to detach from */ detach(element: HTMLElement): void; /** * Destroy the feedback system and clean up */ destroy(): void; /** * Update the color scheme for all existing widgets * @param colorScheme - The new color scheme ('light', 'dark', or 'system') */ setColorScheme(colorScheme: ColorScheme): void; /** * Handle first interaction with any feedback widget * Marks feedback as viewed in cookie and removes auto-highlights from all widgets * @internal */ private handleFirstInteraction; } //# sourceMappingURL=coolhand-feedback.d.ts.map