// =============================================================================
// COOKIE BANNER CONFIG
// =============================================================================

import type { CookieCategory } from './enums'
import type { LocalizedText } from './data-point'

/**
 * Einzelner Cookie in einer Kategorie
 */
export interface CookieInfo {
  name: string
  provider: string
  purpose: LocalizedText
  expiry: string
  type: 'FIRST_PARTY' | 'THIRD_PARTY'
}

/**
 * Cookie-Banner Kategorie
 */
export interface CookieBannerCategory {
  id: CookieCategory
  name: LocalizedText
  description: LocalizedText
  isRequired: boolean                       // Essentiell = required
  defaultEnabled: boolean
  dataPointIds: string[]                    // Verknuepfte Datenpunkte
  cookies: CookieInfo[]
}

/**
 * Styling fuer Cookie Banner
 */
export interface CookieBannerStyling {
  position: 'BOTTOM' | 'TOP' | 'CENTER'
  theme: 'LIGHT' | 'DARK' | 'CUSTOM'
  primaryColor?: string
  secondaryColor?: string
  textColor?: string
  backgroundColor?: string
  borderRadius?: number
  maxWidth?: number
}

/**
 * Texte fuer Cookie Banner
 */
export interface CookieBannerTexts {
  title: LocalizedText
  description: LocalizedText
  acceptAll: LocalizedText
  rejectAll: LocalizedText
  customize: LocalizedText
  save: LocalizedText
  privacyPolicyLink: LocalizedText
}

/**
 * Generierter Code fuer Cookie Banner
 */
export interface CookieBannerEmbedCode {
  html: string
  css: string
  js: string
  scriptTag: string                         // Fertiger Script-Tag zum Einbinden
}

/**
 * Vollstaendige Cookie Banner Konfiguration
 */
export interface CookieBannerConfig {
  impressumUrl?: string
  id: string
  tenantId: string
  categories: CookieBannerCategory[]
  styling: CookieBannerStyling
  texts: CookieBannerTexts
  embedCode?: CookieBannerEmbedCode
  updatedAt: Date
}
