/**
 * Processing Activities Catalog — Shared Types & Metadata
 */

import {
  DataSubjectCategory,
  PersonalDataCategory,
  LegalBasisType,
  ProtectionLevel,
  LocalizedText,
} from '../../types'

export interface ProcessingActivityTemplate {
  id: string
  category: ProcessingActivityCategory
  name: LocalizedText
  description: LocalizedText
  purposes: LocalizedText[]
  dataSubjectCategories: DataSubjectCategory[]
  personalDataCategories: PersonalDataCategory[]
  suggestedLegalBasis: LegalBasisType[]
  suggestedRetentionYears: number
  suggestedProtectionLevel: ProtectionLevel
  dpiaLikely: boolean
  commonSystems: string[]
  commonVendorCategories: string[]
}

export type ProcessingActivityCategory =
  | 'HR'              // Human Resources
  | 'SALES'           // Vertrieb
  | 'MARKETING'       // Marketing
  | 'FINANCE'         // Finanzen
  | 'IT'              // IT & Sicherheit
  | 'CUSTOMER_SERVICE' // Kundenservice
  | 'WEBSITE'         // Website & Apps
  | 'GENERAL'         // Allgemein

export const PROCESSING_ACTIVITY_CATEGORY_META: Record<ProcessingActivityCategory, LocalizedText> = {
  HR: { de: 'Personal', en: 'Human Resources' },
  SALES: { de: 'Vertrieb', en: 'Sales' },
  MARKETING: { de: 'Marketing', en: 'Marketing' },
  FINANCE: { de: 'Finanzen', en: 'Finance' },
  IT: { de: 'IT & Sicherheit', en: 'IT & Security' },
  CUSTOMER_SERVICE: { de: 'Kundenservice', en: 'Customer Service' },
  WEBSITE: { de: 'Website & Apps', en: 'Website & Apps' },
  GENERAL: { de: 'Allgemein', en: 'General' },
}
