import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_CITYVET_HATCHING,
  ROUTE_CITYVET_REGISTER_INFO,
  ROUTE_CITYVET_ROUTE_ALLOCATIONS,
  ROUTE_STEWARD_INVENTORY,
  ROUTE_STEWARD_SALE_IN_PROVINCE,
  ROUTE_STEWARD_INVENTORY_STOCK,
  ROUTE_JAHAD_FILES_STATE,
  ROUTE_STEWARD_PURCHASE_OUT_PROVINCE,
  ROUTE_STEWARD_SALE_OUT_PROVINCE,
  ROUTE_STEWARD_SEGMENT,
} from "./routes";
const FilesState = lazy(() => lazyRetry(() => import("../pages/FilesState")));

const StewardInventoryPage = lazy(() =>
  lazyRetry(() => import("../pages/StewardInventoryPage"))
);
const VetFarmAllocations = lazy(() =>
  lazyRetry(() => import("../pages/VetFarmAllocations"))
);
const Hatching = lazy(() => lazyRetry(() => import("../pages/Hatching")));

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

export const cityVetRouting = [
  {
    path: [ROUTE_CITYVET_HATCHING],
    Page: Hatching,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITYVET_REGISTER_INFO],
    Page: VetFarm,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_JAHAD_FILES_STATE],
    Page: FilesState,
    exact: false,
    props: {},
  },
  {
    path: [
      ROUTE_STEWARD_INVENTORY,
      ROUTE_STEWARD_SALE_IN_PROVINCE,
      ROUTE_STEWARD_INVENTORY_STOCK,
      ROUTE_STEWARD_SALE_OUT_PROVINCE,
      ROUTE_STEWARD_PURCHASE_OUT_PROVINCE,
      ROUTE_STEWARD_SEGMENT,
    ],
    Page: StewardInventoryPage,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITYVET_ROUTE_ALLOCATIONS],
    Page: VetFarmAllocations,
    exact: false,
    props: {},
  },
];
