2023-03-15 22:56:53 +00:00
|
|
|
import * as React from 'react';
|
2023-03-30 18:39:59 +00:00
|
|
|
import UploadImage from "../UploadImage";
|
|
|
|
import HelpQuestions from "../helpQuestions";
|
2023-03-15 22:56:53 +00:00
|
|
|
import ResponseSettings from "./responseSettings";
|
2023-03-30 18:39:59 +00:00
|
|
|
import BranchingQuestions from "../branchingQuestions";
|
2023-03-15 22:56:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
switchState: string,
|
2023-07-11 10:43:04 +00:00
|
|
|
totalIndex: number,
|
2023-03-15 22:56:53 +00:00
|
|
|
}
|
|
|
|
|
2023-07-11 10:43:04 +00:00
|
|
|
export default function SwitchAnswerOptions({switchState = 'setting', totalIndex }: Props) {
|
2023-03-15 22:56:53 +00:00
|
|
|
|
|
|
|
switch (switchState) {
|
|
|
|
case 'setting':
|
2023-07-11 10:43:04 +00:00
|
|
|
return (<ResponseSettings totalIndex={totalIndex}/>);
|
2023-03-15 22:56:53 +00:00
|
|
|
break;
|
|
|
|
case 'help':
|
2023-03-30 18:39:59 +00:00
|
|
|
return (<HelpQuestions/>);
|
2023-03-15 22:56:53 +00:00
|
|
|
break
|
|
|
|
case 'branching':
|
2023-03-30 18:39:59 +00:00
|
|
|
return (<BranchingQuestions/>);
|
2023-03-15 22:56:53 +00:00
|
|
|
break;
|
|
|
|
case 'image':
|
|
|
|
return (<UploadImage/>);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return (<></>)
|
|
|
|
}
|
|
|
|
}
|