export type TemplateType = "international" | "custom";

export interface ExamTemplate {
  id: number;
  name: string;
  type: TemplateType;
  editable: boolean;
  active: boolean;
  subject_id?: number;
  entity_id?: number;
  teacher_id?: number;
  structure: TemplateStructure;
  total_time_min: number;
  pass_threshold?: number;
  results_release_mode: "auto" | "manual_approval";
  randomize_questions: boolean;
  icon?: string;
  skill_count?: number;
  total_questions?: number;
}

export interface TemplateStructure {
  skills: TemplateSkill[];
}

export interface TemplateSkill {
  name: string;
  parts: TemplatePart[];
  total_time_min: number;
}

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

export interface TemplatePath {
  international: ExamTemplate[];
  custom: ExamTemplate[];
}

export interface TemplateCard {
  id: number;
  name: string;
  icon: string;
  skill_count: number;
  total_questions: number;
  total_time: string;
  locked: boolean;
}
