/** * Connects an existing form to Clickmax lead ingestion. * Use this when the host page owns the markup and styling, but wants the SDK to * handle mapping, submit state, success, and redirect behavior. */ export declare function bindForm(form: HTMLFormElement, options: BindFormOptions): () => void; declare interface BindFormOptions extends SharedFormsOptions { hijackForm?: boolean; onError?: (error: Error) => void; onSuccess?: (result: { leadId: string; }) => void; } /** * Renders a ready-to-use Clickmax lead capture widget into the target container. * Use this when consumers want the SDK-owned markup and themeable default styles. */ export declare function createWidget(container: HTMLElement, options: CreateWidgetOptions): { destroy(): void; element: HTMLElement; }; declare interface CreateWidgetOptions extends SharedFormsOptions { accentColor?: string; closeOnSuccess?: boolean; description?: string; fields?: string[]; lgpdRequired?: boolean; mode?: 'inline' | 'modal'; requiredFields?: string[]; showLgpd?: boolean; submitLabel?: string; theme?: ThemeMode; title?: string; widgetId?: string; } declare interface SharedFormsOptions { apiUrl?: string; locale?: string; noStyles?: boolean; redirectUrl?: string; redirectWithQuery?: boolean; resetOnSuccess?: boolean; slug: string; successMessage?: string; } /** * Sends a lead directly to the Clickmax ingest endpoint. * Use this when the host page already owns the markup and submit lifecycle. */ export declare function submitLead(options: SubmitLeadOptions): Promise; declare interface SubmitLeadInput { email?: string; lgpdApproved?: boolean; name?: string; telephone?: string; utmCampaign?: string; utmContent?: string; utmMedium?: string; utmSource?: string; utmTerm?: string; } declare interface SubmitLeadOptions { apiUrl?: string; data: SubmitLeadInput; signal?: AbortSignal; slug: string; } declare interface SubmitLeadResponse { leadId: string; redirectUrl?: string | null; } declare type ThemeMode = 'auto' | 'dark' | 'light'; export { }