import { MultipleChoiceExercise } from "@/interfaces/exam";
import Vanilla from "./Vanilla";
import MultipleChoiceUnderline from "./Underline";

const MultipleChoice: React.FC<{sectionId: number; exercise: MultipleChoiceExercise}> = (props) => {
    const {exercise} = props;

    const length = exercise.questions[0].options.length;

    if (exercise.questions[0].prompt.includes('<u>')) {
        return <MultipleChoiceUnderline {...props} />
    }  

    return (<Vanilla {...props} optionsQuantity={length}/>);
}

export default MultipleChoice;
