import {Add, Edit} from "@mui/icons-material"; import {Box, Button, Chip, Dialog, DialogContent, DialogTitle, Grid, IconButton, Input, Tab, Tabs} from "@mui/material"; import {useState} from "react"; import {useDispatch, useSelector} from "react-redux"; import {driverNames} from "../../consts/driverNames"; import {addSlot, removeSlot, renameSlot} from "../../libs/reducers/configReducer"; import {Calculator} from "./Calculator"; export function TabManager() { const config = useSelector(state => state.config) const { slots } = config; const dispatch = useDispatch() const [tab, setTab] = useState(0); const [editText, setEditText] = useState(""); const [openRenameSlot, setOpenRenameSlot] = useState(null); const saveSlotEdit = () => { dispatch(renameSlot({ id: openRenameSlot.id, slotTitle: editText })) setOpenRenameSlot(null); } return (