import { Exercise, FillBlanksExercise, InteractiveSpeakingExercise, MatchSentencesExercise, MultipleChoiceExercise, SpeakingExercise, TrueFalseExercise, UserSolution, WriteBlanksExercise, WritingExercise, } from "@/interfaces/exam"; import dynamic from "next/dynamic"; import FillBlanks from "./FillBlanks"; import InteractiveSpeaking from "./InteractiveSpeaking"; import MultipleChoice from "./MultipleChoice"; import Speaking from "./Speaking"; import TrueFalseSolution from "./TrueFalse"; import WriteBlanks from "./WriteBlanks"; import Writing from "./Writing"; const MatchSentences = dynamic(() => import("@/components/Solutions/MatchSentences"), {ssr: false}); export interface CommonProps { updateIndex?: (internalIndex: number) => void; onNext: (userSolutions: UserSolution) => void; onBack: (userSolutions: UserSolution) => void; } export const renderSolution = (exercise: Exercise, onNext: () => void, onBack: () => void, updateIndex?: (internalIndex: number) => void) => { switch (exercise.type) { case "fillBlanks": return ; case "trueFalse": return ; case "matchSentences": return ; case "multipleChoice": return ( ); case "writeBlanks": return ; case "writing": return ; case "speaking": return ; case "interactiveSpeaking": return ; } };