/**
 * VVT Baseline-Katalog — Marketing
 */

import type { BaselineTemplate } from './types'

export const MARKETING_VVT_TEMPLATES: BaselineTemplate[] = [
  {
    templateId: 'marketing-newsletter',
    businessFunction: 'marketing',
    name: 'Newsletter-Marketing',
    description: 'Versand von Marketing-E-Mails und Newslettern an Abonnenten',
    purposes: ['Direktmarketing', 'Kundenbindung', 'Informationsversand'],
    legalBases: [
      { type: 'CONSENT', description: 'Einwilligung zum Newsletter-Empfang', reference: 'Art. 6 Abs. 1 lit. a DSGVO, § 7 Abs. 2 UWG' },
    ],
    dataSubjectCategories: ['NEWSLETTER_SUBSCRIBERS', 'CUSTOMERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'USAGE_DATA'],
    recipientCategories: [
      { type: 'PROCESSOR', name: 'E-Mail-Dienstleister' },
      { type: 'INTERNAL', name: 'Marketing-Abteilung' },
    ],
    retentionPeriod: { description: 'Bis zum Widerruf der Einwilligung', deletionProcedure: 'Sofortige Loeschung bei Abmeldung' },
    tomDescription: 'Double-Opt-In, Abmeldelink in jeder E-Mail, Einwilligungsprotokollierung',
    structuredToms: {
      accessControl: ['Nur Marketing-Team'],
      confidentiality: ['TLS-Versand', 'Keine Weitergabe an Dritte'],
      integrity: ['Einwilligungsnachweis (Timestamp, IP, Version)'],
      availability: ['Redundanter E-Mail-Service'],
      separation: ['Newsletter-Liste getrennt von CRM'],
    },
    typicalSystems: ['Newsletter-Tool', 'E-Mail-Marketing-Plattform'],
    protectionLevel: 'LOW',
    dpiaRequired: false,
    tags: ['marketing', 'newsletter', 'email'],
  },
  {
    templateId: 'marketing-website-analytics',
    businessFunction: 'marketing',
    name: 'Website-Analytics',
    description: 'Analyse des Nutzerverhaltens auf der Website mittels Tracking-Tools',
    purposes: ['Website-Optimierung', 'Reichweitenmessung'],
    legalBases: [
      { type: 'CONSENT', description: 'Cookie-Einwilligung', reference: 'Art. 6 Abs. 1 lit. a DSGVO, § 25 TDDDG' },
    ],
    dataSubjectCategories: ['WEBSITE_USERS'],
    personalDataCategories: ['IP_ADDRESS', 'DEVICE_ID', 'USAGE_DATA', 'LOCATION_DATA'],
    recipientCategories: [
      { type: 'PROCESSOR', name: 'Analytics-Anbieter' },
      { type: 'INTERNAL', name: 'Marketing' },
    ],
    retentionPeriod: { duration: 14, durationUnit: 'MONTHS', description: '14 Monate', deletionProcedure: 'Automatische Loeschung/Anonymisierung' },
    tomDescription: 'IP-Anonymisierung, Cookie-Consent-Management, Opt-Out-Moeglichkeit',
    structuredToms: {
      accessControl: ['Nur Webanalyse-Team'],
      confidentiality: ['IP-Anonymisierung', 'Pseudonymisierung'],
      integrity: ['Datenqualitaetspruefung'],
      availability: ['CDN-basiertes Tracking'],
      separation: ['Analytics getrennt von personenbezogenen Profilen'],
    },
    typicalSystems: ['Matomo', 'Plausible', 'Google Analytics'],
    protectionLevel: 'MEDIUM',
    dpiaRequired: false,
    tags: ['marketing', 'analytics', 'website', 'tracking'],
  },
  {
    templateId: 'marketing-social-media',
    businessFunction: 'marketing',
    name: 'Social-Media-Marketing',
    description: 'Betrieb von Social-Media-Kanaelen und Interaktion mit Nutzern',
    purposes: ['Oeffentlichkeitsarbeit', 'Kundeninteraktion'],
    legalBases: [
      { type: 'LEGITIMATE_INTEREST', description: 'Marketing', reference: 'Art. 6 Abs. 1 lit. f DSGVO' },
    ],
    dataSubjectCategories: ['WEBSITE_USERS', 'CUSTOMERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'USAGE_DATA', 'COMMUNICATION_DATA'],
    recipientCategories: [
      { type: 'CONTROLLER', name: 'Social-Media-Plattform (gemeinsame Verantwortlichkeit)' },
    ],
    retentionPeriod: { description: 'Abhaengig von Plattform-Einstellungen', deletionProcedure: 'Regelmaessige Pruefung und Bereinigung' },
    tomDescription: 'Datenschutzeinstellungen der Plattform, gemeinsame Verantwortlichkeit gemaess Art. 26',
    structuredToms: {
      accessControl: ['Nur Social-Media-Manager', 'Passwort-Manager'],
      confidentiality: ['Plattform-Datenschutzeinstellungen'],
      integrity: ['Redaktionsplan'],
      availability: ['Multi-Kanal-Management'],
      separation: ['Geschaeftlich/Privat getrennt'],
    },
    typicalSystems: ['Social-Media-Plattformen', 'Social-Media-Management-Tool'],
    protectionLevel: 'LOW',
    dpiaRequired: false,
    tags: ['marketing', 'social-media'],
  },
]
