// =============================================================================
// Loeschfristen Document — Types, Defaults & Severity Labels
// =============================================================================

import type { ComplianceIssueSeverity } from '../loeschfristen-compliance'

export interface LoeschkonzeptOrgHeader {
  organizationName: string
  industry: string
  dpoName: string
  dpoContact: string
  responsiblePerson: string
  locations: string[]
  employeeCount: string
  loeschkonzeptVersion: string
  lastReviewDate: string
  nextReviewDate: string
  reviewInterval: string
}

export interface LoeschkonzeptRevision {
  version: string
  date: string
  author: string
  changes: string
}

export function createDefaultLoeschkonzeptOrgHeader(): LoeschkonzeptOrgHeader {
  const now = new Date()
  const nextYear = new Date()
  nextYear.setFullYear(nextYear.getFullYear() + 1)

  return {
    organizationName: '',
    industry: '',
    dpoName: '',
    dpoContact: '',
    responsiblePerson: '',
    locations: [],
    employeeCount: '',
    loeschkonzeptVersion: '1.0',
    lastReviewDate: now.toISOString().split('T')[0],
    nextReviewDate: nextYear.toISOString().split('T')[0],
    reviewInterval: 'Jaehrlich',
  }
}

export const SEVERITY_LABELS_DE: Record<ComplianceIssueSeverity, string> = {
  CRITICAL: 'Kritisch',
  HIGH: 'Hoch',
  MEDIUM: 'Mittel',
  LOW: 'Niedrig',
}

export const SEVERITY_COLORS: Record<ComplianceIssueSeverity, string> = {
  CRITICAL: '#dc2626',
  HIGH: '#ea580c',
  MEDIUM: '#d97706',
  LOW: '#6b7280',
}
