import { QuizQuestionEmoji } from "@frontend/squzanswerer";
import HelpQuestions from "../helpQuestions";
import SettingEmoji from "./settingEmoji";

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

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