import { PropertyValues } from 'lit'; import { PktElement } from '../../base-elements/element'; interface ConsentItem { name: string; consent: boolean; } interface ConsentValue { items: ConsentItem[]; } interface CookieConsentEvent { value: string | ConsentValue; } type CookieEventHandler = (consent: CookieConsentEvent) => void; interface CookieEvents { on(eventName: string, handler: CookieEventHandler): void; off(eventName: string, handler: CookieEventHandler): void; } interface CookieBannerApi { cookieConsent: { validateConsentCookie(): Promise; getConsentCookie(): string | ConsentValue; }; openCookieModal(): void; } declare global { interface Window { cookieBanner_devMode?: boolean; cookieBanner_cookieDomain?: string | null; cookieBanner_cookieSecure?: string | null; cookieBanner_cookieExpiryDays?: string | null; cookieBanner_googleAnalyticsId?: string | null; cookieBanner_hotjarId?: string | null; cookieBanner?: CookieBannerApi; __cookieEvents?: CookieEvents; } } export type TPktConsentTriggerType = 'button' | 'link' | 'footerlink' | 'icon'; export interface IPktConsent { devMode?: boolean; cookieDomain?: string | null; cookieSecure?: string | null; cookieExpiryDays?: string | null; hotjarId?: string | null; googleAnalyticsId?: string | null; i18nLanguage?: string; triggerType?: TPktConsentTriggerType | null; triggerText?: string | null; } export declare class PktConsent extends PktElement implements IPktConsent { private _cookieEventHandler?; devMode: boolean; hotjarId: string | null; googleAnalyticsId: string | null; cookieDomain: string | null; cookieSecure: string | null; cookieExpiryDays: string | null; triggerType: TPktConsentTriggerType | null; triggerText: string | null; i18nLanguage: string; connectedCallback(): void; disconnectedCallback(): void; /** * Parses a JSON string when needed; returns the input unchanged when it's * already a parsed object or when parsing fails. * Exposed for backwards compatibility — tests still rely on it. */ returnJsonOrObject(obj: T | string): T; emitCookieConsents(consent: CookieConsentEvent): void; protected firstUpdated(_changedProperties: PropertyValues): Promise; triggerInit(): void; openModal(e: Event): void; render(): import('lit').TemplateResult<1>; } export {};