import { useLocation } from "react-router-dom";
import { Button } from "@mui/material";
import { NavLink } from "../../../../components/nav-link/NavLink";
import { Grid } from "../../../../components/grid/Grid";
import { SPACING } from "../../../../data/spacing";
import {
  ROUTE_CITY_HATCHING,
  ROUTE_CITY_NEW_REQUEST,
} from "../../../../routes/routes";

export const CityHatchingOperations = () => {
  const { pathname } = useLocation();

  return (
    <Grid
      container
      gap={SPACING.SMALL}
      p={SPACING.SMALL}
      direction={{ xs: "column", md: "row" }}
    >
      <NavLink
        to={ROUTE_CITY_HATCHING}
        active={pathname === ROUTE_CITY_HATCHING ? "true" : null}
      >
        <Button variant="text" color="inherit">
          ثبت اطلاعات جوجه ریزی
        </Button>
      </NavLink>
      <NavLink
        to={ROUTE_CITY_NEW_REQUEST}
        active={pathname === ROUTE_CITY_NEW_REQUEST ? "true" : null}
      >
        <Button variant="text" color="inherit">
          ثبت درخواست کشتار
        </Button>
      </NavLink>
    </Grid>
  );
};
