import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_PROVINCE_JAHAD_PRODUCT_DISTRIBUTION,
  ROUTE_PROVINCE_JAHAD_PRODUCT_DISTRIBUTION_ALLOCATION,
  ROUTE_PROVINCE_JAHAD_PRODUCT_DISTRIBUTION_POLICY,
  ROUTE_PROVINCE_JAHAD_PRODUCT_SHARES,
  ROUTE_PROVINCE_JAHAD_PRODUCT_TRANSACTIONS,
  ROUTE_PROVINCE_JAHAD_COOPERATIVES,
  ROUTE_PROVINCE_JAHAD_HERDS,
  ROUTE_PROVINCE_JAHAD_RANCHERS,
  ROUTE_PROVINCE_JAHAD_SELL_REPORT,
  ROUTE_PROVINCE_JAHAD_UNIONS,
  ROUTE_PROVINCE_JAHAD_USERS,
} from "./routes";

const RequestsPage = lazy(() =>
  lazyRetry(() => import("../pages/ProvinceJahadRequests"))
);

export const liveStockProvinceJahadRouting = [
  {
    path: [
      ROUTE_PROVINCE_JAHAD_UNIONS,
      ROUTE_PROVINCE_JAHAD_COOPERATIVES,
      ROUTE_PROVINCE_JAHAD_RANCHERS,
      ROUTE_PROVINCE_JAHAD_HERDS,
      ROUTE_PROVINCE_JAHAD_USERS,
      ROUTE_PROVINCE_JAHAD_PRODUCT_DISTRIBUTION,
      ROUTE_PROVINCE_JAHAD_PRODUCT_DISTRIBUTION_ALLOCATION,
      ROUTE_PROVINCE_JAHAD_PRODUCT_DISTRIBUTION_POLICY,
      ROUTE_PROVINCE_JAHAD_PRODUCT_SHARES,
      ROUTE_PROVINCE_JAHAD_PRODUCT_TRANSACTIONS,
      ROUTE_PROVINCE_JAHAD_SELL_REPORT,
    ],
    Page: RequestsPage,
    exact: false,
    props: {},
  },
];
