import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_SLAUGHTER_HOUSE_VET_ACTIVE_REQUESTS,
  ROUTE_SLAUGHTER_HOUSE_VET_ARCHIVED_REQUESTS,
  ROUTE_SLAUGHTER_HOUSE_VET_FILE_ROUTE,
  ROUTE_SLAUGHTER_HOUSE_VET_NEW_REQUESTS,
  ROUTE_SLAUGHTER_HOUSE_VET_REJECTED_REQUESTS,
  ROUTE_SLAUGHTER_HOUSE_VET_REQUESTS,
  ROUTE_SLAUGHTER_HOUSE_VET_COMPLAINTS,
  ROUTE_SLAUGHTER_PRICING,
  ROUTE_SLAUGHTER_HOUSE_VET_ENTER_BAR_INFO,
  ROUTE_SLAUGHTER_HOUSE_VET_FREE_BUY_ROUTE,
} from "./routes";

const SlaughterHouseVetPage = lazy(() =>
  lazyRetry(() => import("../pages/SlaughterHouseVet"))
);
// const File = lazy(() => lazyRetry(() => import("../pages/File")));
const NewFile = lazy(() => lazyRetry(() => import("../pages/NewFile")));

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

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

export const slaughterHouseVetRouting = [
  //requests
  {
    path: [
      ROUTE_SLAUGHTER_HOUSE_VET_REQUESTS,
      ROUTE_SLAUGHTER_HOUSE_VET_NEW_REQUESTS,
      ROUTE_SLAUGHTER_HOUSE_VET_ACTIVE_REQUESTS,
      ROUTE_SLAUGHTER_HOUSE_VET_REJECTED_REQUESTS,
      ROUTE_SLAUGHTER_HOUSE_VET_ARCHIVED_REQUESTS,
      ROUTE_SLAUGHTER_HOUSE_VET_ENTER_BAR_INFO,
      ROUTE_SLAUGHTER_HOUSE_VET_COMPLAINTS,
    ],
    Page: SlaughterHouseVetPage,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_SLAUGHTER_HOUSE_VET_FILE_ROUTE],
    Page: NewFile,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_SLAUGHTER_PRICING],
    Page: SlaughterPricing,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_SLAUGHTER_HOUSE_VET_FREE_BUY_ROUTE],
    Page: FreeBuy,
    exact: false,
    props: {},
  },
];
