import * as i0 from '@angular/core'; import { InjectionToken, AfterViewInit, ElementRef, ModuleWithProviders } from '@angular/core'; import { MatomoFeature } from 'ngx-matomo-client/core'; interface MatomoFormAnalyticsConfiguration { disabled?: boolean; loadScript?: boolean | string; autoScan?: boolean; autoScanDelay?: number; } declare const MATOMO_FORM_ANALYTICS_CONFIGURATION: InjectionToken; declare class TrackFormFieldDirective implements AfterViewInit { private readonly elementRef; private readonly form; private initialized; set matomoIgnore(ignore: boolean); set matomoTrackFormField(name: string | null | undefined); ngAfterViewInit(): void; track(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; static ngAcceptInputType_matomoIgnore: unknown; } declare class TrackFormDirective implements AfterViewInit { private readonly elementRef; private readonly tracker; private initialized; /** If true, will track a conversion after form submit */ trackConversionOnSubmit: boolean; set matomoIgnore(ignore: boolean); set matomoTrackForm(name: string | null | undefined); constructor(); ngAfterViewInit(): void; track(): void; trackSubmit(): void; trackConversion(): void; trackFormConversionOnSubmit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; static ngAcceptInputType_trackConversionOnSubmit: unknown; static ngAcceptInputType_matomoIgnore: unknown; } declare class TrackFormsDirective implements AfterViewInit { private readonly elementRef; private readonly tracker; ngAfterViewInit(): void; scan(): void; trackSubmit(element: Element | ElementRef): void; trackConversion(element: Element | ElementRef): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare const MATOMO_FORM_ANALYTICS_DIRECTIVES: readonly [typeof TrackFormDirective, typeof TrackFormsDirective, typeof TrackFormFieldDirective]; declare class MatomoFormAnalyticsModule { private readonly formAnalytics; constructor(); static forRoot(config?: MatomoFormAnalyticsConfiguration): ModuleWithProviders; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } /** Enable automatic page views tracking */ declare function withFormAnalytics(config?: MatomoFormAnalyticsConfiguration): MatomoFeature; interface MatomoFormAnalyticsInstance { isFormAnalyticsEnabled(): boolean; disableFormAnalytics(): void; setTrackingTimer(delayInMilliSeconds: number): void; } declare class MatomoFormAnalytics { private readonly delegate; disableFormAnalytics(): void; enableFormAnalytics(): void; enableDebugMode(): void; setTrackingTimer(delayInMilliSeconds: number): void; scanForForms(root?: Element | ElementRef): void; trackForm(formElement: Element | ElementRef): void; trackFormSubmit(formElement: Element | ElementRef): void; trackFormConversion(formElementOrName: Element | ElementRef | string, formId?: string): void; isFormAnalyticsEnabled(): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { MATOMO_FORM_ANALYTICS_CONFIGURATION, MATOMO_FORM_ANALYTICS_DIRECTIVES, MatomoFormAnalytics, MatomoFormAnalyticsModule, TrackFormDirective, TrackFormFieldDirective, TrackFormsDirective, withFormAnalytics }; export type { MatomoFormAnalyticsConfiguration, MatomoFormAnalyticsInstance };