export interface Subject {
  id: number;
  name: string;
  code: string;
  is_active: boolean;
  diagnostic_config: DiagnosticConfig;
  mastery_threshold: number;
  grading_scale: string;
  grading_scale_config?: Record<string, unknown>;
  domain_count: number;
  topic_count: number;
}

export interface DiagnosticConfig {
  questions_per_domain: number;
  total_question_cap: number;
  time_limit_minutes: number;
  starting_difficulty: "easy" | "medium" | "hard";
  mastery_per_correct: number;
  mastery_per_incorrect: number;
}

export interface Domain {
  id: number;
  name: string;
  code: string;
  subject_id: number;
  subject_name: string;
  sequence: number;
  topic_count: number;
}

export interface Topic {
  id: number;
  name: string;
  code: string;
  domain_id: number;
  domain_name: string;
  estimated_hours: number;
  difficulty_level: "easy" | "medium" | "hard";
  prerequisite_ids: number[];
  prerequisite_names: string[];
  question_type_weights: Record<string, number>;
  objective_count: number;
}

export interface LearningObjective {
  id: number;
  name: string;
  topic_id: number;
  bloom_level: "remember" | "understand" | "apply" | "analyze" | "evaluate" | "create";
  sequence: number;
}

export interface TaxonomyTree {
  subject: Subject;
  domains: (Domain & { topics: (Topic & { objectives: LearningObjective[] })[] })[];
}
