import { Box, Button, FormControl, FormControlLabel, IconButton, Link, Modal, Radio, RadioGroup, Typography, useTheme, } from "@mui/material"; import { useState, useEffect } from "react"; import { questionStore, resetSomeField } from "@root/questions"; import { updateBranchState } from "@root/branches"; import { Select } from "./Select"; import DeleteIcon from "@icons/questionsPage/deleteIcon"; import RadioCheck from "@ui_kit/RadioCheck"; import RadioIcon from "@ui_kit/RadioIcon"; import InfoIcon from "@icons/Info"; const ACTIONS = ["Показать", "Скрыть"]; const STIPULATION = ["Условие 1", "Условие 2", "Условие 3"]; const ANSWER = ["Условие 1", "Условие 2", "Условие 3"]; const CONDITIONS = [ "Все условия обязательны", "Обязательно хотя бы одно условие", ]; export default function BranchingQuestions() { const [condition, setCondition] = useState(false); const [conditionSelected, setConditionSelected] = useState(false); const { openedModalSettings } = questionStore(); const theme = useTheme(); useEffect(() => { updateBranchState({ action: ACTIONS[0], condition: CONDITIONS[0] }); }, []); const handleClose = () => { resetSomeField({ openedModalSettings: "" }); }; return ( <> () { setConditionSelected(true); updateBranchState({ stipulation }); }} sx={{ marginBottom: "15px" }} /> {conditionSelected && ( <> Дан ответ (Укажите один или несколько вариантов)