import { Color } from '@ionic/core'; /** Position of the banner relative to the viewport. */ export type CookieBannerPosition = 'bottom' | 'top'; /** * Configuration for `val-cookie-banner`. * * The banner is purely presentational: it shows configurable text and * up to three action buttons. It does NOT couple to any consent service — * the parent decides what to do on each event (accept/reject/customize). * * Typical wiring (with `AnalyticsService` from valtech-components): * - `accept` → `analytics.grantAllConsent()` * - `reject` → `analytics.denyAllConsent()` * - `customize` → `router.navigate(['/cookies'])` * * Visibility is controlled by the parent via `[visible]` — typically * tied to `analytics.consentState().hasDecided === false`. */ export interface CookieBannerMetadata { /** Whether the banner is shown. Parent toggles based on `hasDecided`. */ visible: boolean; /** Where the banner anchors. Default `'bottom'`. */ position?: CookieBannerPosition; /** Short title above the message (optional). */ title?: string; /** * Main message shown to the user. Plain text — newlines respected. * For inline links, use `policyHref` + `policyLinkText` so the link * renders consistently after the message. */ message: string; /** Optional inline link appended to the message (e.g. "More info"). */ policyLinkText?: string; /** Href for the inline policy link (relative or absolute). */ policyHref?: string; /** Label for the "accept all" primary action. */ acceptText: string; /** Label for the "reject / essential only" secondary action. */ rejectText: string; /** * Label for the "configure / customize" tertiary action. When omitted, * the button is not rendered (simple two-button mode). */ customizeText?: string; /** Router link applied to the customize button (e.g. `'/cookies'`). */ customizeRouterLink?: string; /** Show an `X` icon to dismiss the banner without deciding. Default `false`. */ dismissible?: boolean; /** Color of the primary action button. Default `'primary'`. */ acceptColor?: Color; /** Color of the secondary action button. Default `'medium'`. */ rejectColor?: Color; /** Color of the tertiary action button. Default `'dark'`. */ customizeColor?: Color; /** * Max width of the inner banner container. Defaults to `'1200px'` so it * doesn't span the full viewport on large screens. */ maxWidth?: string; /** Apply translucent (glass-style) backdrop. Default `false`. */ translucent?: boolean; }