// =============================================================================
// CONTROL LIBRARY
// =============================================================================

import type {
  ControlCategory,
  ControlApplicability,
  ConditionOperator,
  ReviewFrequency,
  ControlPriority,
  ControlComplexity,
} from './enums'

export interface LocalizedString {
  de: string
  en: string
}

export interface FrameworkMapping {
  framework: string
  reference: string
}

export interface ApplicabilityCondition {
  field: string
  operator: ConditionOperator
  value: unknown
  result: ControlApplicability
  priority: number
}

export interface ControlLibraryEntry {
  id: string
  code: string
  category: ControlCategory
  type: 'TECHNICAL' | 'ORGANIZATIONAL'
  name: LocalizedString
  description: LocalizedString
  mappings: FrameworkMapping[]
  applicabilityConditions: ApplicabilityCondition[]
  defaultApplicability: ControlApplicability
  evidenceRequirements: string[]
  reviewFrequency: ReviewFrequency
  priority: ControlPriority
  complexity: ControlComplexity
  tags: string[]
}
