export interface Question { id: string; text: string; options?: Record; type: "multiple-choice" | "text" | "boolean" | undefined; correctAnswer: string | undefined; solution?: string | undefined; } export interface Exam { id: string; title: string; description: string; questions: Question[]; timeLimit?: number; passingScore?: number; } export interface ExamAnswer { questionId: string; answer: any; timestamp: Date; } export interface ExamAttempt { examId: string; exam: Exam; answers: ExamAnswer[]; startTime: Date; endTime?: Date; score?: number; passed?: boolean; apiResponse?: any; totalQuestions: number; } export interface ExamContextType { currentExam: Exam | null; currentAttempt: ExamAttempt | null; isHydrated: boolean; isInitialized: boolean; // Actions setCurrentExam: (exam: Exam) => void; startExam: () => void; setAnswer: (questionId: string, answer: any) => void; submitExam: () => ExamAttempt; clearExam: () => void; setApiResponse: (response: any) => void; // Getters getAnswer: (questionId: string) => any; getProgress: () => number; isExamStarted: () => boolean; isExamCompleted: () => boolean; getApiResponse: () => any; }