"use client"; import { RadioAnswersList, RadioAnswersListProps, } from "@/components/widgets/RadioAnswersList/RadioAnswersList"; import { LayoutQuestion, LayoutQuestionProps, } from "@/components/layout/LayoutQuestion/LayoutQuestion"; import { SelectAnswersList, SelectAnswersListProps, } from "@/components/widgets/SelectAnswersList/SelectAnswersList"; interface QuestionProps extends Omit, "title" | "content"> { layoutQuestionProps: Omit; content: RadioAnswersListProps | SelectAnswersListProps; contentType: "radio-answers-list" | "select-answers-list"; } function Question({ layoutQuestionProps, content, contentType, ...props }: QuestionProps) { return ( {content && (
{contentType === "radio-answers-list" && ( )} {contentType === "select-answers-list" && ( )}
)}
); } export { Question };