import * as React from "react";
import HelpQuestions from "../helpQuestions";
import SettingData from "./settingData";
import BranchingQuestions from "../branchingQuestions";

interface Props {
  switchState: string;
  totalIndex: number;
}

export default function SwitchData({
  switchState = "setting",
  totalIndex,
}: Props) {
  switch (switchState) {
    case "setting":
      return <SettingData />;
      break;
    case "help":
      return <HelpQuestions totalIndex={totalIndex} />;
      break;
    case "branching":
      return <BranchingQuestions totalIndex={totalIndex} />;
      break;
    default:
      return <></>;
  }
}
