import { Box, Button } from "@mui/material" import { StepButtonsBlock } from "../StepButtonsBlock/StepButtonsBlock" import { FC, useState } from "react"; import { MinifiedData, TagKeys } from "../types"; import { CurrentFields } from "./CurrentFields"; import { NewFields } from "./NewFields"; import { QuestionPair } from "./AmoQuestions"; type ItemsSelectionViewProps = { items: MinifiedData[] | []; fieldsItems: MinifiedData[] | []; selectedItemId?: string | null; setSelectedQuestion: (value: string | null) => void; selectedField?: string | null; setSelectedField: (value: string | null) => void; handleScroll?: () => void; onLargeBtnClick: () => void; onSmallBtnClick: () => void; activeScope: TagKeys; FieldsAllowedFC: MinifiedData[]; setIsCurrentFields: (a:boolean) => void; isCurrentFields: boolean } export const EntitiesQuestions: FC = ({ items, fieldsItems, selectedItemId, setSelectedQuestion, selectedField, setSelectedField, handleScroll, onLargeBtnClick, onSmallBtnClick, activeScope, FieldsAllowedFC, setIsCurrentFields, isCurrentFields, }) => { return ( { isCurrentFields ? e.entity === activeScope)} currentField={selectedField} currentQuestion={selectedItemId} setCurrentField={setSelectedField} setCurrentQuestion={setSelectedQuestion} /> : } { onLargeBtnClick() }} largeBtnText={"Добавить"} onSmallBtnClick={onSmallBtnClick} smallBtnText={"Отменить"} /> ) }