text: import React from "react";
  import PropTypes from "prop-types";
  import { makeStyles } from "@material-ui/core/styles";
  import AppBar from "@material-ui/core/AppBar";
  import Tabs from "@material-ui/core/Tabs";
  import Tab from "@material-ui/core/Tab";
  import PhoneIcon from "@material-ui/icons/Phone";
  import FavoriteIcon from "@material-ui/icons/Favorite";
  import PersonPinIcon from "@material-ui/icons/PersonPin";
  import HelpIcon from "@material-ui/icons/Help";
  import ShoppingBasket from "@material-ui/icons/ShoppingBasket";
  import ThumbUp from "@material-ui/icons/ThumbUp";
  import Typography from "@material-ui/core/Typography";
  import Box from "@material-ui/core/Box";
  import TabContent from "./TabContent";
  
  function TabPanel(props) {
    const { children, value, index, ...other } = props;
  
    return (
      <div
        role="tabpanel"
        hidden={value !== index}
        id={`scrollable-force-tabpanel-${index}`}
        aria-labelledby={`scrollable-force-tab-${index}`}
        {...other}
      >
        {value === index && (
          <Box p={3}>
            <Typography>{children}</Typography>
          </Box>
        )}
      </div>
    );
  }
  
  TabPanel.propTypes = {
    children: PropTypes.node,
    index: PropTypes.any.isRequired,
    value: PropTypes.any.isRequired,
  };
  
  function a11yProps(index) {
    return {
      id: `scrollable-force-tab-${index}`,
      "aria-controls": `scrollable-force-tabpanel-${index}`,
    };
  }
  
  const useStyles = makeStyles((theme) => ({
    root: {
      flexGrow: 1,
      width: "100%",
      backgroundColor: theme.palette.background.paper,
    },
  }));
  
  const TabSection = () => {
    const classes = useStyles();
    const [value, setValue] = React.useState(0);
  
    const handleChange = (event, newValue) => {
      setValue(newValue);
    };
  
    return (
      <div className={classes.root}>
        <AppBar position="static" color="primary">
          <Tabs
            value={value}
            onChange={handleChange}
            indicatorColor="primary"
            textColor="default"
            centered
          >
            <Tab label="Details" icon={<PhoneIcon />} {...a11yProps(0)} />
            <Tab label="Donor" icon={<FavoriteIcon />} {...a11yProps(1)} />
            <Tab label="Recipient" icon={<PersonPinIcon />} {...a11yProps(2)} />
            <Tab label="Doctors" icon={<HelpIcon />} {...a11yProps(3)} />
            <Tab
              label="Govt Auth I"
              icon={<ShoppingBasket />}
              {...a11yProps(4)}
            />
            <Tab label="Govt Auth II" icon={<ThumbUp />} {...a11yProps(4)} />
          </Tabs>
        </AppBar>
        <TabPanel value={value} index={0}>
          <TabContent />
        </TabPanel>
        <TabPanel value={value} index={1}>
          Item Two
        </TabPanel>
        <TabPanel value={value} index={2}>
          Item Three
        </TabPanel>
        <TabPanel value={value} index={3}>
          Item Four
        </TabPanel>
        <TabPanel value={value} index={4}>
          Item Five
        </TabPanel>
        <TabPanel value={value} index={5}>
          Item Six
        </TabPanel>
        <TabPanel value={value} index={6}>
          Item Seven
        </TabPanel>
      </div>
    );
  };
  
  export default TabSection;
  