/**
 * Risk Management types
 *
 * Risk assessment, mitigation tracking, and residual risk
 * calculation structures.
 */

import type { RiskLikelihood, RiskImpact, RiskSeverity, RiskStatus, MitigationType } from './core'

// =============================================================================
// RISK MITIGATION
// =============================================================================

export interface RiskMitigation {
  id: string
  description: string
  type: MitigationType
  status: 'PLANNED' | 'IN_PROGRESS' | 'COMPLETED'
  effectiveness: number // 0-100
  controlId: string | null
}

// =============================================================================
// RISK
// =============================================================================

export interface Risk {
  id: string
  title: string
  description: string
  category: string
  likelihood: RiskLikelihood
  impact: RiskImpact
  severity: RiskSeverity
  inherentRiskScore: number
  residualRiskScore: number
  status: RiskStatus
  mitigation: RiskMitigation[]
  owner: string | null
  relatedControls: string[]
  relatedRequirements: string[]
}
