/**
 * ConsentGate - GDPR-compliant consent management for telemetry.
 *
 * Gates PostHog (and any future telemetry provider) initialization on
 * user consent status. Supports:
 * - Explicit consent requirement (opt-in model)
 * - GTM Consent Mode v2 integration (reads analytics_storage from dataLayer)
 * - Programmatic grant/deny API for host page consent banners
 *
 * The ConsentGate lives in the runtime (not the PostHog adapter) because
 * consent is provider-agnostic — if we switch from PostHog to Segment or
 * another provider, consent logic should not change.
 */
export type ConsentStatus = 'granted' | 'denied' | 'pending';
export interface ConsentConfig {
    /** Initial consent status. Default: 'pending' */
    initialStatus?: ConsentStatus;
    /** If true, telemetry is blocked until grant() is called. Default: false */
    requireExplicitConsent?: boolean;
    /** Read consent state from GTM's window.dataLayer consent events. Default: false */
    readFromGtmConsentMode?: boolean;
    /** Called whenever consent status changes. */
    onConsentChange?: (status: ConsentStatus) => void;
}
type ConsentListener = (status: ConsentStatus) => void;
export declare class ConsentGate {
    private status;
    private listeners;
    private configCallback?;
    private gtmEnabled;
    private destroyed;
    constructor(config?: ConsentConfig);
    /**
     * Grant consent — enables telemetry collection.
     */
    grant(): void;
    /**
     * Deny consent — disables telemetry collection.
     */
    deny(): void;
    /**
     * Get the current consent status.
     */
    getStatus(): ConsentStatus;
    /**
     * Subscribe to consent status changes.
     * Returns an unsubscribe function.
     */
    subscribe(listener: ConsentListener): () => void;
    /**
     * Poll GTM's dataLayer for consent state.
     * Scans for the most recent consent update event with analytics_storage.
     */
    pollGtmConsent(): void;
    /**
     * Clean up listeners and stop responding to changes.
     */
    destroy(): void;
    private setStatus;
    private notify;
}
export {};
