import { QuizQuestionImages } from "@frontend/squzanswerer";
import HelpQuestions from "../helpQuestions";
import SettingOpytionsPict from "./settingOpytionsPict";

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

export default function SwitchAnswerOptionsPict({ switchState = "setting", question }: Props) {
  switch (switchState) {
    case "setting":
      return (
        <SettingOpytionsPict
          questionId={question.id}
          isRequired={question.content.required}
          isMulti={question.content.multi}
          isOwn={question.content.own}
          proportions={question.content.xy}
          format={question.content.format}
        />
      );
    case "help":
      return (
        <HelpQuestions
          questionId={question.id}
          hintText={question.content.hint.text}
          hintVideo={question.content.hint.video}
        />
      );
    default:
      return <></>;
  }
}
