import { QuizSetupStep } from "@model/quizSettings";
import { notReachable } from "../utils/notReachable";
import ContactFormPage from "../pages/ContactFormPage/ContactFormPage";
import InstallQuiz from "../pages/InstallQuiz/InstallQuiz";
import FormQuestionsPage from "../pages/Questions/Form/FormQuestionsPage";
import QuestionsPage from "../pages/Questions/QuestionsPage";
import { QuestionsMap } from "../pages/QuestionsMap";
import { Result } from "../pages/Result/Result";
import { Setting } from "../pages/Result/Setting";
import StartPageSettings from "../pages/startPage/StartPageSettings";
import StepOne from "../pages/startPage/stepOne";
import Steptwo from "../pages/startPage/steptwo";


interface Props {
    activeStep: QuizSetupStep;
    quizType: string;
}

export default function SwitchStepPages({
    activeStep = 1,
    quizType,
}: Props) {
    switch (activeStep) {
        case 1: return <StepOne />;
        case 2: return <Steptwo />;
        case 3: return <StartPageSettings />;
        case 4: return quizType === "form" ? <FormQuestionsPage /> : <QuestionsPage />;
        case 5: return <Result />;
        case 6: return <Setting />;
        case 7: return <QuestionsMap />;
        case 8: return <ContactFormPage />;
        case 9: return <InstallQuiz />;
        case 10: return <>Реклама</>;
        default: return notReachable(activeStep);
    }
}
