import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_VETFARM_HATCHING,
  ROUTE_VETFARM_INSPECTIONS_ROUTE,
  ROUTE_VETFARM_REGISTER_INFO,
  ROUTE_VETFARM_ROUTE_ALLOCATIONS,
  ROUTE_VETFARM_ROUTE_HATCHING,
} from "./routes";

const VetFarm = lazy(() => lazyRetry(() => import("../pages/VetFarm")));
const VetFarmAllocations = lazy(() =>
  lazyRetry(() => import("../pages/VetFarmAllocations"))
);
const VetFarmInspections = lazy(() =>
  lazyRetry(() => import("../pages/VetFarmInspections"))
);
const Hatching = lazy(() =>
  lazyRetry(() => import("../pages/OperatorNewHatching"))
);
const ChickenHatching = lazy(() =>
  lazyRetry(() => import("../pages/Hatching"))
);

export const vetFarmRouting = [
  {
    path: [ROUTE_VETFARM_HATCHING],
    Page: ChickenHatching,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_VETFARM_REGISTER_INFO],
    Page: VetFarm,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_VETFARM_INSPECTIONS_ROUTE],
    Page: VetFarmInspections,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_VETFARM_ROUTE_HATCHING],
    Page: Hatching,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_VETFARM_ROUTE_ALLOCATIONS],
    Page: VetFarmAllocations,
    exact: false,
    props: {},
  },
];
