// =============================================================================
// DATA POINT
// =============================================================================

import type {
  DataPointCategory,
  RiskLevel,
  LegalBasis,
  RetentionPeriod,
  CookieCategory,
} from './enums'

/**
 * Lokalisierter Text (DE/EN)
 */
export interface LocalizedText {
  de: string
  en: string
}

/**
 * Einzelner Datenpunkt im Katalog
 */
export interface DataPoint {
  id: string
  code: string                              // z.B. "A1", "B2", "C3"
  category: DataPointCategory
  name: LocalizedText
  description: LocalizedText
  purpose: LocalizedText
  riskLevel: RiskLevel
  legalBasis: LegalBasis
  legalBasisJustification: LocalizedText
  retentionPeriod: RetentionPeriod
  retentionJustification: LocalizedText
  cookieCategory: CookieCategory | null     // null = kein Cookie
  isSpecialCategory: boolean                // Art. 9 DSGVO (sensible Daten)
  requiresExplicitConsent: boolean
  thirdPartyRecipients: string[]
  technicalMeasures: string[]
  tags: string[]
  isCustom?: boolean                        // Kundenspezifischer Datenpunkt
  isActive?: boolean                        // Aktiviert fuer diesen Tenant
}

/**
 * YAML-Struktur fuer Datenpunkte (fuer Loader)
 */
export interface DataPointYAML {
  id: string
  code: string
  category: string
  name_de: string
  name_en: string
  description_de: string
  description_en: string
  purpose_de: string
  purpose_en: string
  risk_level: string
  legal_basis: string
  legal_basis_justification_de: string
  legal_basis_justification_en: string
  retention_period: string
  retention_justification_de: string
  retention_justification_en: string
  cookie_category: string | null
  is_special_category: boolean
  requires_explicit_consent: boolean
  third_party_recipients: string[]
  technical_measures: string[]
  tags: string[]
}
