import { Box, Button, Link, Typography, useTheme } from "@mui/material"; import {NameplateLogo} from "@icons/NameplateLogo"; import YoutubeEmbedIframe from "./tools/YoutubeEmbedIframe"; import {useQuizData} from "@contexts/QuizDataContext"; import {quizThemes} from "@utils/themes/Publication/themePublication"; import {useRootContainerSize} from "../../contexts/RootContainerWidthContext"; import type {QuizQuestionResult} from "../../model/questionTypes/result"; import {setCurrentQuizStep} from "@stores/quizView"; import {DESIGN_LIST} from "@/components/ViewPublicationPage/Question"; type ResultFormProps = { resultQuestion: QuizQuestionResult; }; export const ResultForm = ({resultQuestion}: ResultFormProps) => { const theme = useTheme(); const isMobile = useRootContainerSize() < 650; const isTablet = useRootContainerSize() < 1000; const {settings, show_badge} = useQuizData(); const spec = settings.cfg.spec console.log(quizThemes[settings.cfg.theme].isLight) return ( {settings.cfg.startpage.logo && } {settings.cfg.info.orgname} { !resultQuestion?.content.useImage && resultQuestion.content.video && ( ) } { resultQuestion?.content.useImage && resultQuestion.content.back && ( ) } {resultQuestion.description !== "" && resultQuestion.description !== " " && ( {resultQuestion.description} )} {resultQuestion.title} { resultQuestion.content.text !== "" && resultQuestion.content.text !== " " && ( { resultQuestion.content.text } ) } {show_badge && Сделано на PenaQuiz } {settings.cfg.resultInfo.showResultForm === "before" && !Boolean(settings.cfg.score) && ( )} {settings.cfg.resultInfo.showResultForm === "after" && resultQuestion.content.redirect && ( )} ); };