/**
 * Processing Activities — IT, Customer Service, Website & General Templates
 */

import { ProcessingActivityTemplate } from './types'

export const IT_TEMPLATES: ProcessingActivityTemplate[] = [
  {
    id: 'tpl-it-user-management',
    category: 'IT',
    name: {
      de: 'IT-Benutzerverwaltung',
      en: 'IT User Management',
    },
    description: {
      de: 'Verwaltung von Benutzerkonten, Zugriffsrechten und Authentifizierung',
      en: 'Managing user accounts, access rights, and authentication',
    },
    purposes: [
      { de: 'Verwaltung von Benutzerkonten', en: 'Managing user accounts' },
      { de: 'Zugriffssteuerung', en: 'Access control' },
      { de: 'Single Sign-On', en: 'Single Sign-On' },
    ],
    dataSubjectCategories: ['EMPLOYEES'],
    personalDataCategories: ['NAME', 'CONTACT', 'LOGIN_DATA', 'USAGE_DATA'],
    suggestedLegalBasis: ['CONTRACT', 'LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 1,
    suggestedProtectionLevel: 'HIGH',
    dpiaLikely: false,
    commonSystems: ['Active Directory', 'Okta', 'Azure AD'],
    commonVendorCategories: ['SECURITY', 'CLOUD_INFRASTRUCTURE'],
  },
  {
    id: 'tpl-it-logging',
    category: 'IT',
    name: {
      de: 'IT-Protokollierung',
      en: 'IT Logging',
    },
    description: {
      de: 'Protokollierung von IT-Aktivitäten zur Sicherheit und Fehleranalyse',
      en: 'Logging IT activities for security and error analysis',
    },
    purposes: [
      { de: 'Sicherheitsüberwachung', en: 'Security monitoring' },
      { de: 'Fehleranalyse', en: 'Error analysis' },
      { de: 'Nachvollziehbarkeit', en: 'Traceability' },
    ],
    dataSubjectCategories: ['EMPLOYEES', 'CUSTOMERS', 'WEBSITE_USERS'],
    personalDataCategories: ['IP_ADDRESS', 'DEVICE_ID', 'USAGE_DATA', 'LOGIN_DATA'],
    suggestedLegalBasis: ['LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 1,
    suggestedProtectionLevel: 'MEDIUM',
    dpiaLikely: false,
    commonSystems: ['Splunk', 'ELK Stack', 'Datadog'],
    commonVendorCategories: ['SECURITY', 'ANALYTICS'],
  },
  {
    id: 'tpl-it-video-surveillance',
    category: 'IT',
    name: {
      de: 'Videoüberwachung',
      en: 'Video Surveillance',
    },
    description: {
      de: 'Videoüberwachung von Geschäftsräumen zum Schutz vor Diebstahl und Vandalismus',
      en: 'Video surveillance of business premises for theft and vandalism prevention',
    },
    purposes: [
      { de: 'Schutz vor Diebstahl und Vandalismus', en: 'Protection against theft and vandalism' },
      { de: 'Zugangskontrolle', en: 'Access control' },
      { de: 'Beweissicherung', en: 'Evidence preservation' },
    ],
    dataSubjectCategories: ['EMPLOYEES', 'VISITORS', 'CUSTOMERS'],
    personalDataCategories: ['PHOTO_VIDEO', 'BIOMETRIC_DATA'],
    suggestedLegalBasis: ['LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 0.1,
    suggestedProtectionLevel: 'HIGH',
    dpiaLikely: true,
    commonSystems: ['CCTV-System'],
    commonVendorCategories: ['SECURITY'],
  },
  {
    id: 'tpl-it-backup',
    category: 'IT',
    name: {
      de: 'Datensicherung (Backup)',
      en: 'Data Backup',
    },
    description: {
      de: 'Regelmäßige Sicherung von Unternehmensdaten',
      en: 'Regular backup of company data',
    },
    purposes: [
      { de: 'Datensicherung', en: 'Data backup' },
      { de: 'Disaster Recovery', en: 'Disaster Recovery' },
      { de: 'Geschäftskontinuität', en: 'Business continuity' },
    ],
    dataSubjectCategories: ['EMPLOYEES', 'CUSTOMERS', 'SUPPLIERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'CONTRACT_DATA', 'COMMUNICATION_DATA'],
    suggestedLegalBasis: ['LEGITIMATE_INTEREST', 'LEGAL_OBLIGATION'],
    suggestedRetentionYears: 1,
    suggestedProtectionLevel: 'HIGH',
    dpiaLikely: false,
    commonSystems: ['Veeam', 'AWS Backup', 'Azure Backup'],
    commonVendorCategories: ['BACKUP', 'CLOUD_INFRASTRUCTURE'],
  },
]

export const CUSTOMER_SERVICE_TEMPLATES: ProcessingActivityTemplate[] = [
  {
    id: 'tpl-cs-support',
    category: 'CUSTOMER_SERVICE',
    name: {
      de: 'Kundenbetreuung und Support',
      en: 'Customer Support',
    },
    description: {
      de: 'Bearbeitung von Kundenanfragen, Beschwerden und Support-Tickets',
      en: 'Handling customer inquiries, complaints, and support tickets',
    },
    purposes: [
      { de: 'Bearbeitung von Kundenanfragen', en: 'Handling customer inquiries' },
      { de: 'Beschwerdemanagement', en: 'Complaint management' },
      { de: 'Technischer Support', en: 'Technical support' },
    ],
    dataSubjectCategories: ['CUSTOMERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'CONTRACT_DATA', 'COMMUNICATION_DATA'],
    suggestedLegalBasis: ['CONTRACT', 'LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 3,
    suggestedProtectionLevel: 'MEDIUM',
    dpiaLikely: false,
    commonSystems: ['Zendesk', 'Freshdesk', 'Intercom'],
    commonVendorCategories: ['SUPPORT', 'CRM'],
  },
  {
    id: 'tpl-cs-satisfaction',
    category: 'CUSTOMER_SERVICE',
    name: {
      de: 'Kundenzufriedenheitsbefragungen',
      en: 'Customer Satisfaction Surveys',
    },
    description: {
      de: 'Durchführung von Umfragen zur Messung der Kundenzufriedenheit',
      en: 'Conducting surveys to measure customer satisfaction',
    },
    purposes: [
      { de: 'Messung der Kundenzufriedenheit', en: 'Measuring customer satisfaction' },
      { de: 'Qualitätsverbesserung', en: 'Quality improvement' },
    ],
    dataSubjectCategories: ['CUSTOMERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'USAGE_DATA'],
    suggestedLegalBasis: ['CONSENT', 'LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 2,
    suggestedProtectionLevel: 'LOW',
    dpiaLikely: false,
    commonSystems: ['SurveyMonkey', 'Typeform', 'NPS-Tools'],
    commonVendorCategories: ['ANALYTICS', 'MARKETING'],
  },
]

export const WEBSITE_TEMPLATES: ProcessingActivityTemplate[] = [
  {
    id: 'tpl-web-analytics',
    category: 'WEBSITE',
    name: {
      de: 'Web-Analyse',
      en: 'Web Analytics',
    },
    description: {
      de: 'Analyse des Nutzerverhaltens auf der Website zur Optimierung',
      en: 'Analyzing user behavior on the website for optimization',
    },
    purposes: [
      { de: 'Analyse des Nutzerverhaltens', en: 'Analyzing user behavior' },
      { de: 'Website-Optimierung', en: 'Website optimization' },
      { de: 'Conversion-Tracking', en: 'Conversion tracking' },
    ],
    dataSubjectCategories: ['WEBSITE_USERS'],
    personalDataCategories: ['IP_ADDRESS', 'DEVICE_ID', 'USAGE_DATA', 'LOCATION_DATA'],
    suggestedLegalBasis: ['CONSENT'],
    suggestedRetentionYears: 2,
    suggestedProtectionLevel: 'MEDIUM',
    dpiaLikely: false,
    commonSystems: ['Google Analytics', 'Matomo', 'Plausible'],
    commonVendorCategories: ['ANALYTICS'],
  },
  {
    id: 'tpl-web-contact-form',
    category: 'WEBSITE',
    name: {
      de: 'Kontaktformular',
      en: 'Contact Form',
    },
    description: {
      de: 'Verarbeitung von Anfragen über das Website-Kontaktformular',
      en: 'Processing inquiries submitted via the website contact form',
    },
    purposes: [
      { de: 'Bearbeitung von Kontaktanfragen', en: 'Processing contact inquiries' },
      { de: 'Kommunikation mit Interessenten', en: 'Communication with prospects' },
    ],
    dataSubjectCategories: ['PROSPECTIVE_CUSTOMERS', 'WEBSITE_USERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'COMMUNICATION_DATA'],
    suggestedLegalBasis: ['CONTRACT', 'LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 1,
    suggestedProtectionLevel: 'LOW',
    dpiaLikely: false,
    commonSystems: ['CRM', 'E-Mail-System'],
    commonVendorCategories: ['CRM', 'EMAIL'],
  },
  {
    id: 'tpl-web-user-accounts',
    category: 'WEBSITE',
    name: {
      de: 'Benutzerkonten / Kundenportal',
      en: 'User Accounts / Customer Portal',
    },
    description: {
      de: 'Verwaltung von Benutzerkonten im Kundenportal oder Online-Shop',
      en: 'Managing user accounts in customer portal or online shop',
    },
    purposes: [
      { de: 'Bereitstellung des Kundenportals', en: 'Providing customer portal' },
      { de: 'Benutzerverwaltung', en: 'User management' },
      { de: 'Personalisierung', en: 'Personalization' },
    ],
    dataSubjectCategories: ['CUSTOMERS', 'APP_USERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'LOGIN_DATA', 'USAGE_DATA', 'CONTRACT_DATA'],
    suggestedLegalBasis: ['CONTRACT'],
    suggestedRetentionYears: 1,
    suggestedProtectionLevel: 'MEDIUM',
    dpiaLikely: false,
    commonSystems: ['E-Commerce', 'CRM', 'Auth0'],
    commonVendorCategories: ['HOSTING', 'CRM', 'SECURITY'],
  },
  {
    id: 'tpl-web-cookies',
    category: 'WEBSITE',
    name: {
      de: 'Cookie-Verwaltung',
      en: 'Cookie Management',
    },
    description: {
      de: 'Verwaltung von Cookies und Einholung von Cookie-Einwilligungen',
      en: 'Managing cookies and obtaining cookie consents',
    },
    purposes: [
      { de: 'Speicherung von Cookie-Präferenzen', en: 'Storing cookie preferences' },
      { de: 'Einwilligungsmanagement', en: 'Consent management' },
    ],
    dataSubjectCategories: ['WEBSITE_USERS'],
    personalDataCategories: ['IP_ADDRESS', 'DEVICE_ID', 'USAGE_DATA'],
    suggestedLegalBasis: ['CONSENT', 'LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 1,
    suggestedProtectionLevel: 'LOW',
    dpiaLikely: false,
    commonSystems: ['Cookiebot', 'Usercentrics', 'OneTrust'],
    commonVendorCategories: ['ANALYTICS', 'SECURITY'],
  },
]

export const GENERAL_TEMPLATES: ProcessingActivityTemplate[] = [
  {
    id: 'tpl-gen-communication',
    category: 'GENERAL',
    name: {
      de: 'Geschäftliche Kommunikation',
      en: 'Business Communication',
    },
    description: {
      de: 'E-Mail-Kommunikation, Telefonie und Messaging im Geschäftsverkehr',
      en: 'Email communication, telephony, and messaging in business operations',
    },
    purposes: [
      { de: 'Geschäftliche Kommunikation', en: 'Business communication' },
      { de: 'Dokumentation von Korrespondenz', en: 'Documentation of correspondence' },
    ],
    dataSubjectCategories: ['CUSTOMERS', 'SUPPLIERS', 'BUSINESS_PARTNERS', 'EMPLOYEES'],
    personalDataCategories: ['NAME', 'CONTACT', 'COMMUNICATION_DATA'],
    suggestedLegalBasis: ['CONTRACT', 'LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 6,
    suggestedProtectionLevel: 'MEDIUM',
    dpiaLikely: false,
    commonSystems: ['Microsoft 365', 'Google Workspace', 'Slack'],
    commonVendorCategories: ['EMAIL', 'COMMUNICATION', 'CLOUD_INFRASTRUCTURE'],
  },
  {
    id: 'tpl-gen-visitor',
    category: 'GENERAL',
    name: {
      de: 'Besucherverwaltung',
      en: 'Visitor Management',
    },
    description: {
      de: 'Erfassung und Verwaltung von Besuchern in Geschäftsräumen',
      en: 'Recording and managing visitors in business premises',
    },
    purposes: [
      { de: 'Zutrittskontrolle', en: 'Access control' },
      { de: 'Sicherheit', en: 'Security' },
      { de: 'Nachvollziehbarkeit', en: 'Traceability' },
    ],
    dataSubjectCategories: ['VISITORS'],
    personalDataCategories: ['NAME', 'CONTACT', 'PHOTO_VIDEO'],
    suggestedLegalBasis: ['LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 0.1,
    suggestedProtectionLevel: 'LOW',
    dpiaLikely: false,
    commonSystems: ['Besuchermanagement-System'],
    commonVendorCategories: ['SECURITY'],
  },
  {
    id: 'tpl-gen-supplier',
    category: 'GENERAL',
    name: {
      de: 'Lieferantenverwaltung',
      en: 'Supplier Management',
    },
    description: {
      de: 'Verwaltung von Lieferantenbeziehungen und Beschaffung',
      en: 'Managing supplier relationships and procurement',
    },
    purposes: [
      { de: 'Lieferantenverwaltung', en: 'Supplier management' },
      { de: 'Beschaffung', en: 'Procurement' },
      { de: 'Qualitätsmanagement', en: 'Quality management' },
    ],
    dataSubjectCategories: ['SUPPLIERS', 'BUSINESS_PARTNERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'ADDRESS', 'CONTRACT_DATA', 'BANK_ACCOUNT'],
    suggestedLegalBasis: ['CONTRACT', 'LEGITIMATE_INTEREST'],
    suggestedRetentionYears: 10,
    suggestedProtectionLevel: 'MEDIUM',
    dpiaLikely: false,
    commonSystems: ['ERP', 'Lieferantenportal'],
    commonVendorCategories: ['ERP'],
  },
  {
    id: 'tpl-gen-whistleblower',
    category: 'GENERAL',
    name: {
      de: 'Hinweisgebersystem',
      en: 'Whistleblower System',
    },
    description: {
      de: 'Entgegennahme und Bearbeitung von Hinweisen gemäß Hinweisgeberschutzgesetz',
      en: 'Receiving and processing reports according to whistleblower protection law',
    },
    purposes: [
      { de: 'Entgegennahme von Hinweisen', en: 'Receiving reports' },
      { de: 'Untersuchung von Verstößen', en: 'Investigating violations' },
      { de: 'Schutz von Hinweisgebern', en: 'Protecting whistleblowers' },
    ],
    dataSubjectCategories: ['EMPLOYEES', 'BUSINESS_PARTNERS'],
    personalDataCategories: ['NAME', 'CONTACT', 'COMMUNICATION_DATA'],
    suggestedLegalBasis: ['LEGAL_OBLIGATION'],
    suggestedRetentionYears: 3,
    suggestedProtectionLevel: 'HIGH',
    dpiaLikely: true,
    commonSystems: ['Hinweisgeberportal'],
    commonVendorCategories: ['SECURITY', 'LEGAL'],
  },
]
