import { Grow, makeStyles, Paper, Tab, Tabs, TextField, } from "@material-ui/core"; import { red } from "@material-ui/core/colors"; import { Build, Close } from "@material-ui/icons"; import React, { useState } from "react"; import { StatusChip } from "./StatusChip"; const chunkArray = (myArray: string[], chunk_size: number) => { const results = []; while (myArray.length) { results.push(myArray.splice(0, chunk_size)); } return results; }; const revertBit = (str: string) => { return chunkArray(str.split(""), 2) .reverse() .map((e) => e.join("")) .join(""); }; const detectFlag = (str: string, offset: number) => { const flag = parseInt(str, 16); const mask = 1 << offset; return Number(!!(flag & mask)); }; const useStyle = makeStyles((theme) => ({ toolContainer: { background: theme.palette.primary.main, width: 48, height: 48, borderRadius: 48, position: "fixed", bottom: 100, left: 50, color: theme.palette.primary.contrastText, }, icon: { position: "absolute", left: 12, cursor: "pointer", top: 12, }, popover: { position: "absolute", left: 50, bottom: 48, width: 500, height: 300, padding: 6, border: "1px solid", borderColor: theme.palette.text.disabled, }, close: { float: "right", color: theme.palette.error.main, cursor: "pointer", }, })); const ObjectIdReader = () => { const [id, setId] = useState(""); const tagList = [ ["Create From Task", 15, 1], ["Put Object", 14, 0], ["Return Object", 14, 1], ] as [string, number, number][]; return (