export interface AICourseConfig {
  id: number;
  type: "english" | "ielts";
  student_id: number;
  current_level: string;
  target_level: string;
  learning_style: string[];
  estimated_duration_weeks: number;
  status: "generating" | "quality_check" | "approved" | "active" | "completed";
  generation_steps?: AIGenerationStep[];
  exam_type?: string;
  current_bands?: Record<string, number>;
  skills_ranked_by_gap?: { skill: string; gap: number }[];
  weak_question_types?: Record<string, string[]>;
  ielts_generation_by_skill?: { skill: string; steps: AIGenerationStep[]; progress_percent: number }[];
}

export interface AIGenerationStep {
  name: string;
  status: "pending" | "in_progress" | "complete" | "failed";
  detail?: string;
}

export interface QualityGateCheck {
  name: string;
  status: "pass" | "fail";
  detail: string;
  value?: string;
  target?: string;
}

export interface QualityGateResult {
  course_id: number;
  checks: QualityGateCheck[];
  overall_status: "passed" | "failed" | "pending";
  attempts: number;
  max_attempts: number;
}

export interface ExaminerReviewItem {
  id: number;
  skill: string;
  content_type: string;
  target_band: number;
  generated_at: string;
  examiner?: string;
  status: "pending_review" | "approved" | "rejected";
}

export interface ExaminerReview {
  item_id: number;
  approved: boolean;
  notes?: string;
  checklist: {
    topic_accuracy: boolean;
    difficulty_appropriate: boolean;
    ielts_aligned: boolean;
    culturally_sensitive: boolean;
  };
}

export interface IELTSValidationResult {
  course_id: number;
  layer1_checks: QualityGateCheck[];
  layer2_items: ExaminerReviewItem[];
  overall_status: "passed" | "pending" | "failed";
}

export interface AICourseLevelUp {
  level_achieved: string;
  next_level: string;
  recommendation: "level_up" | "reassess" | "continue";
}

export interface AITrackModule {
  id: number;
  title: string;
  status: "completed" | "in_progress" | "locked";
  estimated_hours: number;
}

export interface AICourseTrack {
  name: string;
  modules: AITrackModule[];
  progress_percent: number;
}
