import { QuizQuestionSelect } from "@frontend/squzanswerer";
import HelpQuestions from "../helpQuestions";
import SettingDropDown from "./settingDropDown";

interface Props {
  switchState: string;
  question: QuizQuestionSelect;
}

export default function SwitchDropDown({ switchState = "setting", question }: Props) {
  switch (switchState) {
    case "setting":
      return (
        <SettingDropDown
          questionId={question.id}
          questionContentDefault={question.content.default}
          isRequired={question.content.required}
        />
      );
    case "help":
      return (
        <HelpQuestions
          questionId={question.id}
          hintVideo={question.content.hint.video}
          hintText={question.content.hint.text}
        />
      );
    default:
      return null;
  }
}
