import {Box, Typography, Link, useTheme} from "@mui/material";
import React from "react";
import EnterIcon from "../../../assets/icons/questionsPage/enterIcon";
import SwitchAnswerOptions from "./switchAnswerOptions";
import ButtonsOptionsAndPict from "../ButtonsOptionsAndPict";
import QuestionsPageCard from "../QuestionPageCard";
import {useParams} from "react-router-dom";
import {questionStore} from "@root/questions";
import {answerStore} from "@root/answer";
import CustomTextField from "@ui_kit/CustomTextField";
interface Props {
totalIndex: number,
}
export default function AnswerOptions({totalIndex}: Props) {
const params = Number(useParams().quizId);
const {listQuestions, updateQuestionsList, createQuestion, removeQuestion} = questionStore()
const {listAnswer, updateAnswerList, createAnswer, removeAnswer} = answerStore()
const theme = useTheme();
const [switchState, setSwitchState] = React.useState('setting');
const SSHC = (data: string) => {
setSwitchState(data)
}
return (
<>
Добавьте ответ
{
createAnswer(params, totalIndex)
}}
>
Добавьте ответ
или нажмите Enter
{listAnswer.length === 0 && listAnswer[params] !== undefined &&
{Object.values(listAnswer[params][totalIndex]).map((e, index) => (
)
)}
}
>
)
}