import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_COOPERATIVE_PRODUCT_DISTRIBUTION,
  ROUTE_COOPERATIVE_PRODUCT_DISTRIBUTION_ALLOCATION,
  ROUTE_COOPERATIVE_PRODUCT_DISTRIBUTION_POLICY,
  ROUTE_COOPERATIVE_PRODUCT_TRANSACTIONS,
  ROUTE_COOPERATIVE_HERDS,
  ROUTE_COOPERATIVE_RANCHERS,
  ROUTE_COOPERATIVE_USERS,
} from "./routes";

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

export const cooperativeRouting = [
  {
    path: [
      ROUTE_COOPERATIVE_RANCHERS,
      ROUTE_COOPERATIVE_HERDS,
      ROUTE_COOPERATIVE_USERS,
      ROUTE_COOPERATIVE_PRODUCT_DISTRIBUTION,
      ROUTE_COOPERATIVE_PRODUCT_DISTRIBUTION_ALLOCATION,
      ROUTE_COOPERATIVE_PRODUCT_DISTRIBUTION_POLICY,
      ROUTE_COOPERATIVE_PRODUCT_TRANSACTIONS,
    ],
    Page: RequestsPage,
    exact: false,
    props: {},
  },
];
