import {Component} from "react"; export declare module QuantumMetricLibrary { interface InitializationOptions { testModeEnabled: boolean; sslPinningEnabled: boolean; certificateKey?: string; crashReportingEnabled: boolean; } function init(): void function initialize(subscription: string, uid: string): void; function initializeWithOptions(subscription: string, uid: string, options: InitializationOptions) function sendNewPageNamed(name: string): void; function sendEvent (eventId: number, value?: string, flags?: number): void; function sendMultidimensionalEvent (eventId: number, value?: string, json?: string, flags?: number): void; function pauseQM(): void function resumeQM(): void function stopQM(): void function resetSessionQM(): void function setSessionCookieCallbackQM(callback: (sessionCookie: string, userString: string, replayUrl?: string) => any): void function enableTestConfig(enabled: boolean): void; } // 'no-encrypt' and 'capture' are accepted by the type but implemented on neither // platform. Tracked separately; removing them is a breaking change for consumers. type PrivacyTypes = 'mask'|'encrypt'|'unmask'|'no-encrypt'|'capture'; type QuantumComponentProps = { children?: React.ReactNode, privacy: PrivacyTypes, style?: React.CSSProperties; metadata?: Record; collapsable?: boolean; }; export const QuantumMetricLibrary: any.eventType = Object.freeze({ EventTypeConversion:(1 << 0), // => 1 EventTypeLogin:(1 << 1), // => 2 EventTypeEmail:(1 << 2), // => 4 EventTypeFirstName:(1 << 3), // => 8 EventTypeLastName:(1 << 4), // => 16 EventTypeCartValue:(1 << 6), // => 64 EventTypeABN:(1 << 7), EventTypeEncrypted:(1 << 8) // => 256 //internal events below // EventTypeQMVersion:(1 << 9), // EventTypeApplicationType:(1 << 10), // EventTypeApplicationVersion :(1 << 11) }) // forwardRef, so a ref reaches the underlying native view. The previous React.FC type // could not express that, even though the raw native component already accepted refs. export const QuantumComponent: React.ForwardRefExoticComponent< QuantumComponentProps & React.RefAttributes >;