export type ExerciseType = | 'multiple-choice' | 'translation' | 'matching-pairs' | 'fill-in-the-blank' | 'speak'; export interface BaseExercise { type: ExerciseType; prompt: string; promptAudio?: boolean; audioText?: string; } export interface MultipleChoiceExercise extends BaseExercise { type: 'multiple-choice'; choices: string[]; correctIndex: number; } export interface TranslationExercise extends BaseExercise { type: 'translation'; acceptedAnswers: string[]; hint?: string; } export interface MatchingPairsExercise extends BaseExercise { type: 'matching-pairs'; pairs: { left: string; right: string }[]; } export interface FillInTheBlankExercise extends BaseExercise { type: 'fill-in-the-blank'; sentence: string; blank: string; hint?: string; wordBank?: string[]; } export interface SpeakExercise extends BaseExercise { type: 'speak'; phrase: string; acceptedAnswers: string[]; } export type Exercise = | MultipleChoiceExercise | TranslationExercise | MatchingPairsExercise | FillInTheBlankExercise | SpeakExercise; export interface Lesson { id: string; topicId: string; title: string; xpReward: number; exercises: Exercise[]; } export interface Topic { id: string; name: string; icon: string; description: string; section: number; prerequisites: string[]; lessons: string[]; } export interface Section { id: number; name: string; description: string; } export interface TopicsConfig { sections: Section[]; topics: Topic[]; }