import { Grid } from "../../../../components/grid/Grid";
import { SPACING } from "../../../../data/spacing";
import { NavLink } from "../../../../components/nav-link/NavLink";
import {
  ROUTE_CITY_JIHAD_ROUTE_GUILDS,
  ROUTE_CITY_JIHAD_ROUTE_STEWARDS,
  ROUTE_CITY_POULTRY_ROUTE_GUILDS,
  ROUTE_CITY_POULTRY_ROUTE_STEWARDS,
} from "../../../../routes/routes";
import LinkItem from "../../../../components/link-item/LinkItem";
import { MdCorporateFare } from "react-icons/md";
import { IoIosPeople } from "react-icons/io";
import { getRoleFromUrl } from "../../../../utils/getRoleFromUrl";

export const GuildsOperationsCityJihad = () => {
  return (
    <Grid
      container
      gap={SPACING.SMALL}
      p={SPACING.SMALL}
      direction={{ xs: "column", md: "row" }}
      justifyContent="center"
    >
      <NavLink
        to={
          getRoleFromUrl() === "CityJahad"
            ? ROUTE_CITY_JIHAD_ROUTE_GUILDS
            : ROUTE_CITY_POULTRY_ROUTE_GUILDS
        }
      >
        <LinkItem
          icon={<MdCorporateFare size={30} color="#244CCC" />}
          title="اصناف"
        />
      </NavLink>
      <NavLink
        to={
          getRoleFromUrl() === "CityJahad"
            ? ROUTE_CITY_JIHAD_ROUTE_STEWARDS
            : ROUTE_CITY_POULTRY_ROUTE_STEWARDS
        }
      >
        <LinkItem
          icon={<IoIosPeople size={30} color="#244CCC" />}
          title="مباشرین"
        />
      </NavLink>
    </Grid>
  );
};
