import {Box, Button, Chip, Dialog, DialogContent, DialogTitle, Grid, IconButton, Input, Tab, Tabs} from "@mui/material"; import {driverNames} from "../../libs/driverNames"; import {Add, Edit} from "@mui/icons-material"; import {useState} from "react"; import {Calculator} from "./Calculator"; import {useDispatch, useSelector} from "react-redux"; import {addSlot, removeSlot, renameSlot} from "../../libs/reducers/configReducer"; 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 (