export interface Roadmap {
  id: string
  title: string
  description: string
  version: number
  status: 'draft' | 'active' | 'completed' | 'archived'
  assessment_id: string | null
  portfolio_id: string | null
  total_items: number
  completed_items: number
  progress: number
  start_date: string | null
  target_date: string | null
  created_at: string
  updated_at: string
}

export interface RoadmapItem {
  id: string
  roadmap_id: string
  title: string
  description: string
  category: 'TECHNICAL' | 'ORGANIZATIONAL' | 'PROCESSUAL' | 'DOCUMENTATION' | 'TRAINING'
  priority: 'CRITICAL' | 'HIGH' | 'MEDIUM' | 'LOW'
  status: 'PLANNED' | 'IN_PROGRESS' | 'BLOCKED' | 'COMPLETED' | 'DEFERRED'
  control_id: string | null
  regulation_ref: string | null
  effort_days: number
  effort_hours: number
  estimated_cost: number
  assignee_name: string
  department: string
  planned_start: string | null
  planned_end: string | null
  actual_start: string | null
  actual_end: string | null
  evidence_required: boolean
  evidence_provided: boolean
  sort_order: number
  created_at: string
  updated_at: string
}

export interface RoadmapStats {
  by_status: Record<string, number>
  by_priority: Record<string, number>
  by_category: Record<string, number>
  by_department: Record<string, number>
  overdue_items: number
  upcoming_items: number
  total_effort_days: number
  progress: number
}

export interface ImportJob {
  id: string
  status: 'pending' | 'parsing' | 'validating' | 'completed' | 'failed'
  filename: string
  total_rows: number
  valid_rows: number
  invalid_rows: number
  items: ParsedItem[]
}

export interface ParsedItem {
  row: number
  title: string
  description: string
  category: string
  priority: string
  is_valid: boolean
  errors: string[]
  warnings: string[]
  matched_control: string | null
  match_confidence: number
}
