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_STEWARD_SALE_IN_PROVINCE,
  ROUTE_STEWARD_INVENTORY_STOCK,
  ROUTE_STEWARD_PURCHASE_OUT_PROVINCE,
  ROUTE_STEWARD_SALE_OUT_PROVINCE,
  ROUTE_STEWARD_SEGMENT,
} from "../../../routes/routes";

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

  return (
    <Grid
      container
      gap={SPACING.SMALL}
      p={SPACING.SMALL}
      direction={{ xs: "row", md: "row" }}
      justifyContent="center"
      // style={{ placeContent: "baseline" }}
      xs={12}
      alignItems="center"
    >
      <NavLink
        to={ROUTE_STEWARD_INVENTORY_STOCK}
        active={pathname === ROUTE_STEWARD_INVENTORY_STOCK ? "true" : null}
      >
        <LinkItem
          icon={<VscNewFolder size={30} color="#244CCC" />}
          title="ورود به انبار"
        />
      </NavLink>
      <NavLink
        to={ROUTE_STEWARD_SALE_IN_PROVINCE}
        active={pathname === ROUTE_STEWARD_SALE_IN_PROVINCE ? "true" : null}
      >
        <LinkItem
          icon={<VscNewFolder size={30} color="#244CCC" />}
          title="فروش داخل استان"
        />
      </NavLink>
      <NavLink
        to={ROUTE_STEWARD_PURCHASE_OUT_PROVINCE}
        active={
          pathname === ROUTE_STEWARD_PURCHASE_OUT_PROVINCE ? "true" : null
        }
      >
        <LinkItem
          icon={<VscNewFolder size={30} color="#244CCC" />}
          title="خرید خارج استان"
        />
      </NavLink>
      <NavLink
        to={ROUTE_STEWARD_SALE_OUT_PROVINCE}
        active={pathname === ROUTE_STEWARD_SALE_OUT_PROVINCE ? "true" : null}
      >
        <LinkItem
          icon={<VscNewFolder size={30} color="#244CCC" />}
          title="فروش به خارج استان"
        />
      </NavLink>
      <NavLink
        to={ROUTE_STEWARD_SEGMENT}
        active={pathname === ROUTE_STEWARD_SEGMENT ? "true" : null}
      >
        <LinkItem
          icon={<VscNewFolder size={30} color="#244CCC" />}
          title="قطعه بندی"
        />
      </NavLink>
    </Grid>
  );
};
