import { VscNewFolder } from "react-icons/vsc";
import { useLocation } from "react-router-dom";
import { Grid } from "../../../../components/grid/Grid";
import LinkItem from "../../../../components/link-item/LinkItem";
import { NavLink } from "../../../../components/nav-link/NavLink";
import { SPACING } from "../../../../data/spacing";
import {
  ROUTE_SLAUGHTER_MORGUE_BROADCAST_MANAGEMENT,
  ROUTE_SLAUGHTER_MORGUE_STOCK,
} from "../../../../routes/routes";

export const SlaughterMorgueOperation = () => {
  const { pathname } = useLocation();
  return (
    <Grid
      container
      gap={SPACING.SMALL}
      p={SPACING.SMALL}
      direction={{ xs: "column", md: "row" }}
      justifyContent="center"
      style={{ placeContent: "baseline" }}
    >
      <NavLink
        to={ROUTE_SLAUGHTER_MORGUE_STOCK}
        active={pathname === ROUTE_SLAUGHTER_MORGUE_STOCK ? "true" : null}
      >
        <LinkItem
          icon={<VscNewFolder size={30} color="#244CCC" />}
          title="موجودی انبار"
        />
      </NavLink>
      <NavLink
        to={ROUTE_SLAUGHTER_MORGUE_BROADCAST_MANAGEMENT}
        active={
          pathname === ROUTE_SLAUGHTER_MORGUE_BROADCAST_MANAGEMENT
            ? "true"
            : null
        }
      >
        <LinkItem
          icon={<VscNewFolder size={30} color="#244CCC" />}
          title="مدیریت پخش"
        />
      </NavLink>
    </Grid>
  );
};
