import { TSurveyQuestion, TSurveyQuestionType } from "@formbricks/types/surveys";
import CTAQuestion from "./CTAQuestion";
import MultipleChoiceMultiQuestion from "./MultipleChoiceMultiQuestion";
import MultipleChoiceSingleQuestion from "./MultipleChoiceSingleQuestion";
import NPSQuestion from "./NPSQuestion";
import OpenTextQuestion from "./OpenTextQuestion";
import RatingQuestion from "./RatingQuestion";
interface QuestionConditionalProps {
question: TSurveyQuestion;
onSubmit: (data: { [x: string]: any }) => void;
lastQuestion: boolean;
brandColor: string;
}
export default function QuestionConditional({
question,
onSubmit,
lastQuestion,
brandColor,
}: QuestionConditionalProps) {
return question.type === TSurveyQuestionType.OpenText ? (
) : question.type === TSurveyQuestionType.MultipleChoiceSingle ? (
) : question.type === TSurveyQuestionType.MultipleChoiceMulti ? (
) : question.type === TSurveyQuestionType.NPS ? (
) : question.type === TSurveyQuestionType.CTA ? (
) : question.type === TSurveyQuestionType.Rating ? (
) : null;
}