import * as React from 'react';

import AnswerOptions from "./answerOptions/AnswerOptions";
import OptionsPicture from "./OptionsPicture/OptionsPicture";
import DataOptions from "./DataOptions/DataOptions";
import SliderOptions from "./SliderOptions/SliderOptions";
import OwnTextField from "./OwnTextField/OwnTextField";
import PageOptions from "./PageOptions/PageOptions";
import OptionsAndPicture from "./OptionsAndPicture/OptionsAndPicture";
import RatingOptions from "./RatingOptions/RatingOptions";
import Emoji from "./Emoji/Emoji";
import DropDown from "./DropDown/DropDown";
import UploadFile from "./UploadFile/UploadFile";

interface Props {
    switchState: string,
}

export default function SwitchQuestionsPage ({switchState = '' }: Props) {
    switch (switchState) {
        case 'answer':
            return (<AnswerOptions />);
            break;

        case 'answerpict':
            return (<OptionsPicture />);
            break;

        case 'answerandpict':
            return (<OptionsAndPicture />);
            break;

        case 'emoji':
            return (<Emoji />);
            break;

        case 'textfield':
            return (<OwnTextField />);
            break;

        case 'dropdown':
            return (<DropDown />);
            break;

        case 'date':
            return (<DataOptions />);
            break;

        case 'slider':
            return (<SliderOptions />);
            break;

        case 'uploader':
            return (<UploadFile />);
            break;

        case 'page':
            return (<PageOptions />);
            break;

        case 'rating':
            return (<RatingOptions />);
            break;

        default:
            return (<></>)
    }
}