/* * Copyright (c) 2025, Salesforce, Inc. * All rights reserved. * For full license text, see the LICENSE.txt file */ /** * The `userConsentCookie` provides utility functions that enable you to incorporate the Cookie Consent mechanism in your components. * @see {@link https://developer.salesforce.com/docs/component-library/bundle/lightning-user-consent-cookie/documentation|User Consent Cookie} */ declare module "lightning/userConsentCookie" { /** * Represents the user's consent choices for different cookie categories. */ export type ConsentPreference = { /** Indicates if the user consents to preference-related cookies. */ Preferences?: boolean; /** Indicates if the user consents to statistics-related cookies. */ Statistics?: boolean; /** Indicates if the user consents to marketing-related cookies. */ Marketing?: boolean; }; /** * Sets the user's cookie consent preferences. * @param consentPreference - Object representing the user's consent choices for different cookie categories. */ export function setCookieConsent(consentPreference: ConsentPreference): void; /** * Checks if a given category is allowed based on the current consent settings. * @param categoryName - The name of the cookie category to check (Valid values: "Essential", "Preferences", "Marketing", "Statistics"). * @returns boolean - True if the category is allowed, false otherwise. */ export function isCategoryAllowedForCurrentConsent( categoryName: "Essential" | "Preferences" | "Marketing" | "Statistics", ): boolean; }