import { Box, Typography, Button } from "@mui/material"; import { useQuestionsStore } from "@root/quizData/store" import type { QuizQuestionResult } from "@model/questionTypes/result"; import YoutubeEmbedIframe from "./tools/YoutubeEmbedIframe" import { NameplateLogo } from "@icons/NameplateLogo"; import { modes } from "../../utils/themes/Publication/themePublication"; type ResultFormProps = { currentQuestion: any; showContactForm: boolean; setShowContactForm: (show: boolean) => void; setShowResultForm: (show: boolean) => void; }; export const ResultForm = ({ currentQuestion, showContactForm, setShowContactForm, setShowResultForm, }: ResultFormProps) => { const { settings, items } = useQuestionsStore() const resultQuestion = (items.find( (question) => question.type === "result" && (question.content.rule.parentId === "line" || currentQuestion.id) )) || items.find( (question) => question.type === "result" && question.content.rule.parentId === "line" ) const mode = modes; const followNextForm = () => { setShowResultForm(false); setShowContactForm(true); }; if (resultQuestion === null || resultQuestion === undefined) { followNextForm() return <> } else { return ( { //@ts-ignore !resultQuestion?.content.useImage && resultQuestion.content.video && ( )} { //@ts-ignore resultQuestion?.content.useImage && resultQuestion.content.back && ( )} {resultQuestion.description !== "" && resultQuestion.description !== " " && ( {resultQuestion.description} )} {resultQuestion.title || "Форма результатов"} { //@ts-ignore resultQuestion.content.text !== "" && //@ts-ignore resultQuestion.content.text !== " " && ( { //@ts-ignore resultQuestion.content.text} )} Сделано на PenaQuiz {settings?.cfg.resultInfo.when === "before" && ( <> )} ); } };