import { Grid } from "../../../../components/grid/Grid";
import { SPACING } from "../../../../data/spacing";
import { NavLink } from "../../../../components/nav-link/NavLink";
import { useLocation } from "react-router-dom";
import {
  ROUTE_AVICULTURE_ARCHIVED_REQUESTS,
  ROUTE_AVICULTURE_AWAITING_INSPECTION_REQUESTS,
  ROUTE_AVICULTURE_AWAITING_PAYMENT_REQUESTS,
  ROUTE_AVICULTURE_GIVE_PERMISSION,
  ROUTE_AVICULTURE_HATCHING,
  ROUTE_AVICULTURE_REJECTED_REQUESTS,
  ROUTE_AVICULTURE_SUBMIT_REQUEST,
} from "../../../../routes/routes";
import LinkItem from "../../../../components/link-item/LinkItem";
import {
  FaArchive,
  FaEgg,
  FaMoneyBillWave,
  FaRegFileAlt,
} from "react-icons/fa";
import { GrInspect } from "react-icons/gr";
import { RiFolderWarningLine } from "react-icons/ri";

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

  return (
    <Grid
      container
      gap={SPACING.SMALL}
      p={SPACING.SMALL}
      direction={{ xs: "column", md: "row" }}
      justifyContent="center"
      style={{ placeContent: "baseline" }}
    >
      <Grid container direction="column" style={{ width: "100%" }}>
        <Grid container gap={SPACING.SMALL} justifyContent="center">
          <NavLink
            to={ROUTE_AVICULTURE_HATCHING}
            active={pathname === ROUTE_AVICULTURE_HATCHING ? "true" : null}
          >
            <LinkItem
              icon={<FaEgg size={30} color="#244CCC" />}
              title="جوجه ریزی"
              description="ثبت و مدیریت جوجه ریزی ها"
            />
          </NavLink>
          {/* <NavLink
        to={ROUTE_AVICULTURE_CREATE_NEW_REQUEST}
        active={
          pathname === ROUTE_AVICULTURE_CREATE_NEW_REQUEST ? "true" : null
        }
      >
        <Button variant="text" color="inherit">
          ثبت درخواست جدید
        </Button>
      </NavLink> */}
          <NavLink
            to={ROUTE_AVICULTURE_SUBMIT_REQUEST}
            active={
              pathname === ROUTE_AVICULTURE_SUBMIT_REQUEST ? "true" : null
            }
          >
            <LinkItem
              icon={<FaRegFileAlt size={30} color="#244CCC" />}
              title="درخواست های کشتار"
              description="مدیریت و ثبت درخواست های کشتار"
            />
          </NavLink>
          <NavLink
            to={ROUTE_AVICULTURE_AWAITING_PAYMENT_REQUESTS}
            active={
              pathname === ROUTE_AVICULTURE_AWAITING_PAYMENT_REQUESTS
                ? "true"
                : null
            }
          >
            <LinkItem
              icon={<FaMoneyBillWave size={30} color="#244CCC" />}
              title="در انتظار پرداخت"
              description="مشاهده درخواست های در انتظار پرداخت کشتارگاه"
            />
          </NavLink>
          <NavLink
            to={ROUTE_AVICULTURE_AWAITING_INSPECTION_REQUESTS}
            active={
              pathname === ROUTE_AVICULTURE_AWAITING_INSPECTION_REQUESTS
                ? "true"
                : null
            }
          >
            <LinkItem
              icon={
                <GrInspect
                  className="svg-icon-color"
                  fill="#244CCC"
                  stroke="#244CCC"
                  style={{ color: "#4285F4" }}
                  color="#244CCC"
                  size={30}
                />
              }
              title="در انتظار بازرسی"
              description="درخواست های در انتظار بررسی بازرس"
            />
          </NavLink>
          <NavLink
            to={ROUTE_AVICULTURE_REJECTED_REQUESTS}
            active={
              pathname === ROUTE_AVICULTURE_REJECTED_REQUESTS ? "true" : null
            }
          >
            <LinkItem
              icon={
                <RiFolderWarningLine
                  className="svg-icon-color"
                  color="#244CCC"
                  size={30}
                />
              }
              title="درخواست های رد شده"
              description="مشاهده درخواست هایی که به دلایل مختلف توسط اتحادیه رد شده است"
            />
          </NavLink>
          <NavLink
            to={ROUTE_AVICULTURE_ARCHIVED_REQUESTS}
            active={
              pathname === ROUTE_AVICULTURE_ARCHIVED_REQUESTS ? "true" : null
            }
          >
            <LinkItem
              icon={
                <FaArchive
                  className="svg-icon-color"
                  color="#244CCC"
                  size={30}
                />
              }
              title="بایگانی"
              description="درخواست های پایان یافته"
            />
          </NavLink>
          <NavLink
            to={ROUTE_AVICULTURE_GIVE_PERMISSION}
            active={
              pathname === ROUTE_AVICULTURE_GIVE_PERMISSION ? "true" : null
            }
          >
            <LinkItem
              icon={
                <FaArchive
                  className="svg-icon-color"
                  color="#244CCC"
                  size={30}
                />
              }
              title="وکالت"
            />
          </NavLink>
        </Grid>
      </Grid>
    </Grid>
  );
};
