/**
 * Use-case assessment + screening result types.
 *
 * Phase 4: extracted from state.ts.
 */

import type { SBOM, SecurityScanResult } from './security'

// =============================================================================
// USE CASE ASSESSMENT
// =============================================================================

export interface UseCaseStep {
  id: string
  name: string
  completed: boolean
  data: Record<string, unknown>
}

export interface AssessmentResult {
  riskLevel: 'LOW' | 'MEDIUM' | 'HIGH' | 'CRITICAL'
  applicableRegulations: string[]
  recommendedControls: string[]
  dsfaRequired: boolean
  aiActClassification: string
}

export interface UseCaseAssessment {
  id: string
  name: string
  description: string
  category: string
  stepsCompleted: number
  steps: UseCaseStep[]
  assessmentResult: AssessmentResult | null
  createdAt: Date
  updatedAt: Date
}

// =============================================================================
// SCREENING RESULT
// =============================================================================

export interface ScreeningResult {
  id: string
  status: 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED'
  startedAt: Date
  completedAt: Date | null
  sbom: SBOM | null
  securityScan: SecurityScanResult | null
  error: string | null
}
