import { Tab, Tabs } from "@mui/material";
import { Grid } from "../../../../components/grid/Grid";
import { getRoleFromUrl } from "../../../../utils/getRoleFromUrl";

export const TradePanelTabs = ({ value, onChange }) => {
  if (getRoleFromUrl() === "KillHouse") {
    return null;
  }

  return (
    <Grid xs={12} container alignItems="center" justifyContent="center" mb={2}>
      <Tabs
        scrollButtons="auto"
        variant="scrollable"
        allowScrollButtonsMobile
        value={value}
        onChange={onChange}
      >
        <Tab label="اعلام کشتار مرغداران" value={0} />
        <Tab label="گزارش معاملات" value={1} />
        <Tab label="معاملات گذشته" value={2} />
      </Tabs>
    </Grid>
  );
};
