export type IELTSExamType = "academic" | "general_training";
export type IELTSSkill = "listening" | "reading" | "writing" | "speaking";
export type AssemblyMode = "auto" | "manual" | "hybrid";
export type ExamDifficulty = "easy" | "medium" | "hard";

export interface IELTSExamConfig {
  exam_type: IELTSExamType;
  skills: IELTSSkill[];
  title: string;
  target_band: number;
  difficulty: ExamDifficulty;
  randomize: boolean;
  assembly_mode: AssemblyMode;
  results_release_mode: "auto" | "manual_approval";
}

export interface IELTSExamResponse {
  exam_id: number;
  title: string;
  status: "draft" | "published" | "archived";
}

export interface IELTSSkillConfig {
  skill: IELTSSkill;
  parts: IELTSPartConfig[];
  available_count: number;
}

export interface IELTSPartConfig {
  part_number: number;
  question_count: number;
  content_type: string;
  time_limit_min: number;
  description: string;
}

export interface ContentPoolItem {
  id: number;
  type: string;
  skill: IELTSSkill;
  part: number;
  preview_text: string;
  difficulty: ExamDifficulty;
  topic_tags: string[];
  usage_count: number;
  quality_rating: number;
  status: "available" | "seen" | "flagged" | "retired";
}

export interface ContentPoolFilters {
  skill?: IELTSSkill;
  part?: number;
  difficulty?: ExamDifficulty;
  topics?: string[];
  status?: string[];
  search?: string;
}

export interface AssemblyResult {
  skill: IELTSSkill;
  part: number;
  selected_items: ContentPoolItem[];
  required_count: number;
}

export interface ValidationCheck {
  name: string;
  status: "pass" | "fail" | "warning";
  description: string;
  details?: string;
}

export interface ExamValidationReport {
  exam_id: number;
  checks: ValidationCheck[];
  can_publish: boolean;
}

export interface ExamAssignRequest {
  student_ids?: number[];
  batch_ids?: number[];
  access_start?: string;
  access_end?: string;
}
