import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_UNION_PRODUCT_DISTRIBUTION,
  ROUTE_UNION_PRODUCT_DISTRIBUTION_ALLOCATION,
  ROUTE_UNION_PRODUCT_DISTRIBUTION_POLICY,
  ROUTE_UNION_PRODUCT_TRANSACTIONS,
  ROUTE_UNION_COOPERATIVES,
  ROUTE_UNION_HERDS,
  ROUTE_UNION_RANCHERS,
  ROUTE_UNION_SELL_REPORT,
  ROUTE_UNION_USERS,
} from "./routes";

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

export const unionRouting = [
  {
    path: [
      ROUTE_UNION_COOPERATIVES,
      ROUTE_UNION_RANCHERS,
      ROUTE_UNION_HERDS,
      ROUTE_UNION_USERS,
      ROUTE_UNION_PRODUCT_DISTRIBUTION,
      ROUTE_UNION_PRODUCT_DISTRIBUTION_ALLOCATION,
      ROUTE_UNION_PRODUCT_DISTRIBUTION_POLICY,
      ROUTE_UNION_PRODUCT_TRANSACTIONS,
      ROUTE_UNION_SELL_REPORT,
    ],
    Page: RequestsPage,
    exact: false,
    props: {},
  },
];
