import type { AnalyticsConsentDecision } from "@opengeni/contracts/analytics-consent-report"; import type { ClientConfig } from "../types.js"; export type AnalyticsConsent = "granted" | "denied"; type AnalyticsConfig = ClientConfig["analytics"]; export declare const ANALYTICS_COLLECTION_ENABLED_EVENT = "opengeni:analytics-collection-enabled"; /** Dispatched when Account menu asks to reopen the consent sheet. */ export declare const OPEN_ANALYTICS_PREFERENCES_EVENT = "opengeni:open-analytics-preferences"; export declare function analyticsHasProviders(config: AnalyticsConfig | null | undefined): boolean; /** True when the console should offer analytics consent UI (first visit + Account reopen). */ export declare function analyticsPreferencesAvailable(config: AnalyticsConfig | null | undefined): boolean; export declare function openAnalyticsPreferences(): void; /** Consume a pending Account-menu open (e.g. event fired before the manager mounted). */ export declare function takePendingAnalyticsPreferencesOpen(): boolean; export declare function storedAnalyticsConsent(storage?: Pick | null): AnalyticsConsent | null; export declare function persistAnalyticsConsent(consent: AnalyticsConsent, storage?: Pick | null): void; /** Install the beacon transport once at boot; tests and non-browser hosts leave it unset. */ export declare function setAnalyticsConsentDecisionSender(send: ((body: string) => void) | null): void; /** * Count a banner answer on the server (`opengeni_analytics_consent_total`). * The body is only the closed decision: no identifier, URL, or cookie. This is * a first-party operational count, not provider analytics, so it is sent for * `denied` too and never starts a provider. */ export declare function reportAnalyticsConsentDecision(decision: AnalyticsConsentDecision): void; export {};