export declare namespace VanillaCookieConsent { interface Cookie { data: any; level: Array; revision: number; rfc_cookie: boolean; } enum AcceptType { ALL = "all", NECESSARY = "necessary", CUSTOM = "custom" } interface UserPreferences { accept_type: AcceptType; accepted_categories: Array; rejected_categories: Array; } /** * Instance of the underlying CookieConsent component. * For available API, see https://github.com/orestbida/cookieconsent#apis--configuration-parameters */ type CookieConsent = { get: (name: string) => any; set: (name: string, value: any) => void; run: (config: any) => void; validCookie: (name: string) => boolean; getConfig: (name: string) => any; allowedCategory: (category: Category) => boolean; eraseCookies: (cookies: string | string[], path?: string, domain?: string) => void; getUserPreferences: () => UserPreferences; }; enum PrimaryButtonRole { ACCEPT_ALL = "accept_all", ACCEPT_SELECTED = "accept_selected" } enum SecondaryButtonRole { ACCEPT_NECESSARY = "accept_necessary", SETTINGS = "settings" } interface ModalPrimaryButton { text?: string; role?: PrimaryButtonRole; } interface ModalSecondaryButton { text?: string; role?: SecondaryButtonRole; } interface ModalBlockToggle { value?: string; enabled?: boolean; readonly?: boolean; } interface CookieTableItem { domain?: string; path?: string; is_regex?: boolean; [key: string]: string | boolean | undefined; } interface ModalBlock { title?: string; description?: string; toggle?: ModalBlockToggle; cookie_table?: CookieTableItem[]; } interface ConsentModal { title?: string; description?: string; primary_btn?: ModalPrimaryButton; secondary_btn?: ModalSecondaryButton; } interface SettingsModal { title?: string; accept_all_btn?: string; reject_all_btn?: string; save_settings_btn?: string; cookie_table_headers?: Record[]; blocks?: ModalBlock[]; } interface Languages { consent_modal?: ConsentModal; settings_modal?: SettingsModal; } enum GuiConsentLayout { BAR = "bar", BOX = "box", CLOUD = "cloud" } enum GuiConsentPosition { BOTTOM_LEFT = "bottom left", BOTTOM_RIGHT = "bottom right", BOTTOM_CENTER = "bottom center", MIDDLE_LEFT = "middle left", MIDDLE_RIGHT = "middle right", MIDDLE_CENTER = "middle center", TOP_LEFT = "top left", TOP_RIGHT = "top right", TOP_CENTER = "top center" } enum GuiSettingsLayout { BAR = "bar", BOX = "box" } enum GuiSettingsPosition { LEFT = "left", RIGHT = "right" } enum Transition { SLIDE = "slide", ZOOM = "zoom" } interface GuiConsentModal { layout: GuiConsentLayout; position: GuiConsentPosition; transition?: Transition; swap_buttons: boolean; } interface GuiSettingsModal { layout: GuiSettingsLayout; position?: GuiSettingsPosition; transition?: Transition; } interface GuiOptions { consent_modal?: GuiConsentModal; settings_modal?: GuiSettingsModal; } interface Options { autorun?: boolean; delay?: number; cookie_expiration?: number; cookie_necessary_only_expiration?: number; cookie_path?: string; cookie_domain?: string; cookie_name?: string; cookie_same_site?: string; use_rfc_cookie?: boolean; theme_css?: string; current_lang?: string; force_consent?: boolean; revision?: number; auto_language?: string | null; autoclear_cookies?: boolean; page_scripts?: boolean; remove_cookie_tables?: boolean; hide_from_bots?: boolean; gui_options?: GuiOptions; onAccept?: (cookie: Cookie) => void; onChange?: (cookie: Cookie, changed_categories: Array) => void; onFirstAction?: (user_preferences: UserPreferences, cookie: Cookie) => void; languages?: Record; } }