import { ContextManager, Context } from '../context'; import { Observable } from '../observable'; /** * Enum representing the overall status of the cookie consent process: 'unknown', 'initializing', 'initialized'. */ export declare enum Status { 'unknown' = "unknown", 'initializing' = "initializing", 'initialized' = "initialized" } /** * Enum representing the consent status for different types of cookies: 'unknown', 'granted', 'rejected'. */ export declare enum ConsentStatus { 'unknown' = "unknown", 'granted' = "granted", 'rejected' = "rejected" } /** * Enum representing different types of cookies: 'essential', 'functional', 'performance', 'marketing'. */ export declare enum CookieType { 'essential' = "essential", 'functional' = "functional", 'performance' = "performance", 'marketing' = "marketing" } /** * Defines the structure of a vendor's information including name, description, and privacy policy URL. */ export interface Vendor { name: string; description: string; privacyPolicyUrl: string; } /** * Manages the state and information related to cookie consent within a context. * - `status`: Observable representing the overall status of the cookie consent. * - `functionalCookies`: Observable for the consent status of functional cookies. * - `performanceCookies`: Observable for the consent status of performance cookies. * - `marketingCookies`: Observable for the consent status of marketing cookies. * - `showSettings`: Observable for displaying cookie settings. * - `performanceVendors`: Array of registered performance vendors. * - `marketingVendors`: Array of registered marketing vendors. * @zcontext */ export declare class CookieConsentContext extends Context { readonly status: Observable; readonly functionalCookies: Observable; readonly performanceCookies: Observable; readonly marketingCookies: Observable; readonly showSettings: Observable<(() => void) | undefined, never>; readonly performanceVendors: Vendor[]; readonly marketingVendors: Vendor[]; /** * Registers a performance vendor. */ registerPerformanceVendor(v: Vendor): void; /** * Registers a marketing vendor. */ registerMarketingVendor(v: Vendor): void; } /** * Retrieves the consent status for functional cookies. * @param {ContextManager} mgr The context manager instance. * @returns {Observable} The observable representing the consent status of functional cookies. */ export declare function useCookieConsentFunctional(mgr: ContextManager): Observable; /** * Retrieves the consent status for performance cookies. * @param {ContextManager} mgr The context manager instance. * @returns {Observable} The observable representing the consent status of performance cookies. */ export declare function useCookieConsentPerformance(mgr: ContextManager): Observable; /** * Retrieves the consent status for marketing cookies. * @param {ContextManager} mgr The context manager instance. * @returns {Observable} The observable representing the consent status of marketing cookies. */ export declare function useCookieConsentMarketing(mgr: ContextManager): Observable; /** * Retrieves the overall cookie consent status. * @param {ContextManager} mgr The context manager instance. * @returns {Observable} The observable representing the overall cookie consent status. */ export declare function useCookieConsentStatus(mgr: ContextManager): Observable; /** * Registers a performance vendor in the `CookieConsentContext`. * @param {ContextManager} mgr The context manager instance. * @param {Vendor} vendor The performance vendor to register. */ export declare function registerPerformanceVendor(mgr: ContextManager, vendor: Vendor): void; /** * Registers a marketing vendor in the `CookieConsentContext`. * @param {ContextManager} mgr The context manager instance. * @param {Vendor} vendor The marketing vendor to register. */ export declare function registerMarketingVendor(mgr: ContextManager, vendor: Vendor): void; /** * Retrieves the list of registered performance vendors. * @param {ContextManager} mgr The context manager instance. * @returns {Vendor[]} An array of registered performance vendors. */ export declare function usePerformanceVendors(mgr: ContextManager): Vendor[]; /** * Retrieves the list of registered marketing vendors. * @param {ContextManager} mgr The context manager instance. * @returns {Vendor[]} An array of registered marketing vendors. */ export declare function useMarketingVendors(mgr: ContextManager): Vendor[]; /** * Retrieves the function to show cookie settings from the `CookieConsentContext`. * @param {ContextManager} mgr The context manager instance. * @returns {Observable<(() => void)|undefined>} The observable representing the function to show cookie settings. */ export declare function useShowCookieSettings(mgr: ContextManager): Observable<(() => void) | undefined, never>;