import * as _angular_core from '@angular/core'; import { OnInit } from '@angular/core'; /** Stored consent outcome. `custom` = per-category preferences were saved. */ type DgaCookieConsent = 'accepted' | 'declined' | 'custom' | null; /** Horizontal placement. Logical `start`/`end` follow reading direction. */ type DgaCookiesAlign = 'start' | 'center' | 'end'; /** * Banner anchor on the viewport. * - `start` | `center` | `end` → bottom edge + that alignment (compact) * - `bottom` | `top` → that edge, centered * - `bottom-start` / `top-end` / … → explicit edge + alignment */ type DgaCookiesPosition = DgaCookiesAlign | 'bottom' | 'top' | 'bottom-start' | 'bottom-center' | 'bottom-end' | 'top-start' | 'top-center' | 'top-end'; /** Optional cookie category for granular consent (GDPR-style preferences). */ interface DgaCookieCategory { id: string; label: string; description?: string; /** Always enabled; toggle is disabled. */ required?: boolean; /** Initial state when no stored preference exists (ignored when `required`). */ defaultEnabled?: boolean; } type DgaCookiePreferences = Record; interface DgaCookieDecision { consent: Exclude; preferences: DgaCookiePreferences; } /** * Privacy-compliant cookie consent banner. * Persists choice (default 365 days); optional category preferences and GA gating. */ declare class DgaCookies implements OnInit { private readonly destroyRef; private readonly hostRef; /** Original parent before body portal (restored on destroy). */ private portalHome; readonly compact: _angular_core.InputSignalWithTransform; /** * Viewport anchor. Use `start` / `center` / `end` for bottom placement, * or compound values like `top-end`. Prefer `align` to set horizontal only. */ readonly position: _angular_core.InputSignal; /** Horizontal alignment (`start` | `center` | `end`). Overrides `position` when set. */ readonly align: _angular_core.InputSignal<"" | DgaCookiesAlign>; /** Auto-open delay when no consent is stored. `0` disables auto-show. */ readonly delayMs: _angular_core.InputSignal; /** When false, never auto-opens (call `show()` manually). */ readonly autoShow: _angular_core.InputSignalWithTransform; /** Show the dismiss (X) control. Dismiss does not persist a decision. */ readonly dismissible: _angular_core.InputSignalWithTransform; /** Show the reject / decline non-essential button. */ readonly showDecline: _angular_core.InputSignalWithTransform; /** Show policy / terms links row. */ readonly showLinks: _angular_core.InputSignalWithTransform; /** Show Customize when `categories` are provided. */ readonly showCustomize: _angular_core.InputSignalWithTransform; /** Dim the page behind the banner (modal-style overlay). */ readonly overlay: _angular_core.InputSignalWithTransform; /** * @deprecated Prefer `overlay`. Same behavior — kept for backward compatibility. */ readonly blocking: _angular_core.InputSignalWithTransform; /** Close the banner when the overlay backdrop is clicked (requires dismissible). */ readonly overlayClose: _angular_core.InputSignalWithTransform; readonly termsHref: _angular_core.InputSignal; readonly privacyHref: _angular_core.InputSignal; /** Optional third policy link (cookie policy). Empty hides it. */ readonly cookiePolicyHref: _angular_core.InputSignal; readonly termsLabel: _angular_core.InputSignal; readonly privacyLabel: _angular_core.InputSignal; readonly cookiePolicyLabel: _angular_core.InputSignal; readonly title: _angular_core.InputSignal; readonly description: _angular_core.InputSignal; readonly acceptLabel: _angular_core.InputSignal; readonly declineLabel: _angular_core.InputSignal; readonly customizeLabel: _angular_core.InputSignal; readonly saveLabel: _angular_core.InputSignal; readonly icon: _angular_core.InputSignal<"access" | "alertCircle" | "ambulance" | "apple" | "arrowDown" | "arrowDown02" | "arrowLeft" | "arrowLeft02" | "arrowNext" | "arrowNext02" | "arrowPrev" | "arrowPrev02" | "arrowRight" | "arrowRight02" | "arrowUp" | "arrowUp02" | "award" | "badgeCheck" | "bell" | "bellAlt" | "book" | "bookType" | "brain" | "building" | "calendar" | "calendarAlt" | "cart" | "check" | "checkCircle" | "checkCircleAlt" | "chevronDown" | "chevronLeft" | "chevronRight" | "clock" | "close" | "cloud" | "colorPicker" | "colors" | "cookie" | "copy" | "desert" | "devices" | "disability" | "door" | "download" | "droplet" | "error" | "external" | "eye" | "eyeOff" | "eyeOffSlash" | "facebook" | "filter" | "fire" | "flash" | "folder" | "glasses" | "globe" | "heading" | "headphones" | "helpCircle" | "highlighter" | "home" | "huawei" | "idCard" | "info" | "instagram" | "letterSpacing" | "link" | "linkAlt" | "linkedin" | "location" | "lock" | "lockPassword" | "logout" | "mail" | "mask" | "maximize" | "menu" | "menuAlt" | "message" | "mic" | "minus" | "moon" | "moonAlt" | "moonCloud" | "moreHorizontal" | "moreVertical" | "paintBoard" | "pause" | "phone" | "playStore" | "plus" | "plusSign" | "police" | "printer" | "rain" | "rainZap" | "refresh" | "riyal" | "search" | "share" | "shrink" | "smartphone" | "snow" | "sort" | "sortDown" | "sortUp" | "star" | "starFilled" | "success" | "sun" | "sunAlt" | "sunCloud" | "textAlign" | "textFont" | "textUnderline" | "touch" | "tradeDown" | "tradeUp" | "translation" | "upload" | "user" | "users" | "warning" | "whatsapp" | "wheelchair" | "wind" | "x" | "youtube" | "zoomIn" | "zoomOut">; /** Google Analytics IDs to disable on decline / when analytics is off. */ readonly gaTrackingIds: _angular_core.InputSignal; /** Consent cookie lifetime in days. */ readonly consentDays: _angular_core.InputSignal; /** Consent cookie name (also used as localStorage key prefix). */ readonly consentCookieName: _angular_core.InputSignal; /** Extra cookies to delete when analytics/marketing is denied. */ readonly analyticsCookieNames: _angular_core.InputSignal; /** Granular categories. When set, Customize / Save Preferences become available. */ readonly categories: _angular_core.InputSignal; readonly accepted: _angular_core.OutputEmitterRef; readonly declined: _angular_core.OutputEmitterRef; readonly closed: _angular_core.OutputEmitterRef; readonly decided: _angular_core.OutputEmitterRef<"accepted" | "declined" | "custom">; readonly preferencesChange: _angular_core.OutputEmitterRef; readonly decision: _angular_core.OutputEmitterRef; /** Controls enter/exit animation state. */ readonly visible: _angular_core.WritableSignal; /** Keeps the panel in the DOM while exit animation plays. */ readonly mounted: _angular_core.WritableSignal; /** Whether the category preferences panel is expanded. */ readonly customizing: _angular_core.WritableSignal; /** Draft toggles while customizing. */ readonly draftPrefs: _angular_core.WritableSignal; private readonly seq; readonly titleId: string; readonly bodyId: string; private openTimer; private closeTimer; readonly copy: _angular_core.Signal<{ title: string; body: string; terms: string; privacy: string; cookiePolicy: string; accept: string; acceptAll: string; decline: string; customize: string; save: string; categories: string; policies: string; close: string; }>; readonly resolvedCategories: _angular_core.Signal; readonly resolvedLinks: _angular_core.Signal<{ href: string; label: string; }[]>; /** * Accept + Decline share a row; Customize / Save spans full width underneath * so Arabic labels stay on one line. Actions stay pinned below the scroll body. */ readonly actionsClasses: _angular_core.Signal; /** Resolved vertical edge + horizontal align (logical start/end). */ readonly placement: _angular_core.Signal<{ edge: "top" | "bottom"; align: DgaCookiesAlign; }>; /** Whether a dimmed backdrop is shown (`overlay` or legacy `blocking`). */ readonly hasOverlay: _angular_core.Signal; readonly panelClasses: _angular_core.Signal; constructor(); ngOnInit(): void; hasCategories(): boolean; hasLinks(): boolean; /** * Re-open the banner (e.g. from a footer Cookie Settings link). * Portals to `document.body` so overflow/transform ancestors cannot clip it. */ show(): void; /** Hide without persisting a decision. */ dismiss(): void; /** Backdrop click — dismiss only when overlayClose + dismissible. */ onOverlayClick(): void; openCustomize(): void; onCategoryToggle(id: string, enabled: boolean): void; accept(): void; decline(): void; savePreferences(): void; private commit; private buildDefaultPrefs; private buildAllPrefs; private readStored; private hidePanel; private trackingIds; /** Move host to `body` so fixed positioning escapes overflow/transform ancestors. */ private ensureBodyPortal; private restorePortal; private clearTimer; private clearCloseTimer; static getConsent(cookieName?: string): DgaCookieConsent; static getPreferences(cookieName?: string): DgaCookiePreferences | null; static setConsent(value: Exclude, options?: { name?: string; days?: number; preferences?: DgaCookiePreferences; }): void; static clearConsent(cookieName?: string): void; /** @internal */ static parseStored(raw: string | null): { consent: DgaCookieConsent; preferences: DgaCookiePreferences | null; }; /** @internal */ static writeConsent(status: Exclude, preferences: DgaCookiePreferences | null, opts: { name: string; days: number; hasCategories: boolean; }): void; static get(name: string): string | null; static set(name: string, value: string, days?: number): void; static delete(name: string): void; safeHref(href: string | undefined | null): string; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { DgaCookies }; export type { DgaCookieCategory, DgaCookieConsent, DgaCookieDecision, DgaCookiePreferences, DgaCookiesAlign, DgaCookiesPosition };