import { Box, Link, Typography, useMediaQuery, useTheme } from "@mui/material"; import { useCallback, useState } from "react"; import { EnterIcon } from "../../../assets/icons/questionsPage/enterIcon"; import { useAddAnswer } from "../../../utils/hooks/useAddAnswer"; import { AnswerDraggableList } from "../AnswerDraggableList"; import ButtonsOptions from "../ButtonsOptions"; import SwitchDropDown from "./switchDropDown"; import type { QuizQuestionSelect } from "@frontend/squzanswerer"; import AnswerItem from "../AnswerDraggableList/AnswerItem"; interface Props { question: QuizQuestionSelect; openBranchingPage: boolean; setOpenBranchingPage: (a: boolean) => void; } export default function DropDown({ question, openBranchingPage, setOpenBranchingPage }: Props) { const onClickAddAnAnswer = useAddAnswer(); const [switchState, setSwitchState] = useState("setting"); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down(790)); return ( <> {question.content.variants.length === 0 ? ( Добавьте ответ ) : ( ( = 100} questionId={question.id} variant={variant} /> ))} /> )} onClickAddAnAnswer(question)} > Добавьте ответ {isMobile ? null : ( <> или нажмите Enter )} ); }