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

export const TicketAllView = () => {
  const [value, setValue] = useState("0");

  const handleChange = (event, newValue) => {
    setValue(newValue);
  };
  return (
    <Grid container xs={12} justifyContent="center" alignItems="center">
      {(getRoleFromUrl() === "AdminX" ||
        getRoleFromUrl() === "SuperAdmin" ||
        getRoleFromUrl() === "ProvinceOperator") && (
        <Tabs
          value={value}
          onChange={handleChange}
          aria-label="secondary tabs example"
        >
          <Tab value="0" label="ارسال تکی" />
          <Tab value="1" label="ارسال یکجا" />
        </Tabs>
      )}
    </Grid>
  );
};
