import { Box, Button, Grid2 as Grid } from "@mui/material"; // import { getTableIcons } from "common/ResponsiveTable"; import SearchSelect, { Option } from "common/SearchSelect"; // import MaterialTable, { MTableToolbar } from "material-table"; // import { Bin, BinYard, Field } from "models"; import { Bin } from "models"; // import { Gate } from "models/Gate"; // import { GrainBag } from "models/GrainBag"; // import { ObjectHeater } from "models/ObjectHeater"; import ObjectDescriber, { SearchableObjects } from "objects/ObjectDescriber"; import { pond } from "protobuf-ts/pond"; import { useBinAPI, useBinYardAPI, // useFieldAPI, useGateAPI, useGlobalState, // useGrainBagAPI, // useObjectHeaterAPI } from "providers"; import { useCallback, useEffect, useState } from "react"; import TeamSearch from "teams/TeamSearch"; import BulkBinSettings from "./bulkEditForms/bulkBinSettings"; import ResponsiveTable from "common/ResponsiveTable"; import { cloneDeep } from "lodash"; //import BulkGateSettings from "./bulkEditForms/bulkGateSettings"; interface customButton { label: string; function: (selectedObjects: any[]) => void; } interface Props { startingObject?: pond.ObjectType; showControls?: boolean; preLoadedData?: any[]; customButtons?: customButton[]; rowClickFunction?: (rowData: any) => void; } export default function ObjectTable(props: Props) { const { startingObject, showControls, preLoadedData, customButtons, rowClickFunction } = props; const [currentType, setCurrentType] = useState( startingObject ?? pond.ObjectType.OBJECT_TYPE_UNKNOWN ); const [selectedType, setSelectedType] = useState