export interface TrainingLesson {
  id: string;
  category: string;
  title: string;
  title_de: string;
  level: "beginner" | "intermediate" | "advanced";
  duration_min: number;
  summary: string;
  summary_de: string;
  sections: TrainingSection[];
  quiz: QuizQuestion[];
  tags: string[];
}

export interface TrainingSection {
  heading: string;
  heading_de?: string;
  blocks: ContentBlock[];
}

export type ContentBlock =
  | { type: "p"; text: string; text_de?: string }
  | { type: "h3"; text: string; text_de?: string }
  | { type: "table"; headers: string[]; headers_de?: string[]; rows: string[][] }
  | { type: "ul"; items: string[]; items_de?: string[] }
  | {
      type: "callout";
      variant: "info" | "warning" | "tip" | "key";
      text: string;
      text_de?: string;
    }
  | { type: "code"; text: string }
  | { type: "formula"; text: string; desc: string; desc_de?: string };

export interface QuizQuestion {
  id: string;
  lesson: string;
  q: string;
  q_de?: string;
  options: [string, string, string, string];
  options_de?: [string, string, string, string];
  answer: 0 | 1 | 2 | 3;
  explanation: string;
  explanation_de?: string;
}

export interface TrainingCategory {
  id: string;
  title: string;
  title_de: string;
  icon: string;
  description: string;
  description_de: string;
  lessons: TrainingLesson[];
}
