import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_CITY_ACTIVE_REQUESTS,
  ROUTE_CITY_ARCHIVED_REQUESTS,
  ROUTE_CITY_REJECTED_REQUESTS,
  ROUTE_CITY_REQUESTS,
  ROUTE_CITY_POULTRY_FARMS,
  ROUTE_CITY_FILE_ROUTE,
  ROUTE_CITY_VIEW_TICKET,
  ROUTE_CITY_TICKET,
  ROUTE_CITY_USER_MANAGEMENT,
  ROUTE_CITY_USER_FILE_ROUTE,
  ROUTE_CITY_AWAITING_PAYMENT_REQUESTS,
  ROUTE_CITY_AWAITING_INSPECTION_REQUESTS,
  ROUTE_CITY_STATICS,
  ROUTE_CITY_HATCHING,
  ROUTE_CITY_NEW_REQUEST,
  ROUTE_CITY_PRICING,
  ROUTE_CITY_NEW_REQUESTS,
  ROUTE_CITY_ROUTE_ALLOCATIONS,
  ROUTE_CITY_ROUTE_FILES_STATE,
  ROUTE_CITY_POULTRIES,
  ROUTE_CITY_FREE_SALES_REQUESTS,
  ROUTE_CITY_VISOR_STATICS,
  ROUTE_CITYـHATCHINGS,
  ROUTE_CITY_VISOR_STATICS_CHARTS,
  ROUTE_CITY_VISOR_STATICS_PREDICTION,
  ROUTE_CITY_VISOR_STATICS_PREDICTION_VIEW,
  ROUTE_CITY_DIFFRENCE_KILLER_SLAUGHTER,
  ROUTE_CITY_DIFFRENCE_KILLER,
  ROUTE_CITY_INCREASE_HATCHING,
  ROUTE_CITY_VISOR_STATICSـHATCHINGS_DETAILS,
  ROUTE_CITY_POULTRIES_DETAILS,
} from "./routes";

const CityRequests = lazy(() =>
  lazyRetry(() => import("../pages/CityRequests"))
);
const CityAvicultureManagement = lazy(() =>
  lazyRetry(() => import("../pages/CityAvicultureManagement"))
);
// const File = lazy(() => import("../pages/File"));
const NewFile = lazy(() => lazyRetry(() => import("../pages/NewFile")));
const Tickets = lazy(() => lazyRetry(() => import("../pages/Tickets")));
const UserManagement = lazy(() =>
  lazyRetry(() => import("../pages/CityUserManagement"))
);
const UserFile = lazy(() => lazyRetry(() => import("../pages/CityUserFile")));
const Poultries = lazy(() => lazyRetry(() => import("../pages/Poultries")));
const Statics = lazy(() => lazyRetry(() => import("../pages/AdminStatics")));

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

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

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

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

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

const AllHatchings = lazy(() =>
  lazyRetry(() => import("../pages/AdminHatchings"))
);
const DiffrenceKiller = lazy(() =>
  lazyRetry(() => import("../pages/DiffrenceKillerPage"))
);
const PoultriesDetails = lazy(() =>
  lazyRetry(() => import("../pages/PoultriesDetailsPage"))
);

export const cityRouting = [
  {
    path: [
      ROUTE_CITY_REQUESTS,
      ROUTE_CITY_ACTIVE_REQUESTS,
      ROUTE_CITY_REJECTED_REQUESTS,
      ROUTE_CITY_ARCHIVED_REQUESTS,
      ROUTE_CITY_AWAITING_PAYMENT_REQUESTS,
      ROUTE_CITY_AWAITING_INSPECTION_REQUESTS,
      ROUTE_CITY_NEW_REQUESTS,
      ROUTE_CITY_FREE_SALES_REQUESTS,
    ],
    Page: CityRequests,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITYـHATCHINGS, ROUTE_CITY_VISOR_STATICSـHATCHINGS_DETAILS],
    Page: AllHatchings,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_FILE_ROUTE],
    Page: NewFile,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_POULTRY_FARMS],
    Page: CityAvicultureManagement,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_VIEW_TICKET, ROUTE_CITY_TICKET],
    Page: Tickets,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_VIEW_TICKET, ROUTE_CITY_TICKET],
    Page: Tickets,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_USER_MANAGEMENT],
    Page: UserManagement,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_USER_FILE_ROUTE],
    Page: UserFile,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_STATICS],
    Page: Statics,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_POULTRIES],
    Page: Poultries,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_HATCHING, ROUTE_CITY_NEW_REQUEST],
    Page: Hatching,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_PRICING],
    Page: CityPricing,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_ROUTE_ALLOCATIONS],
    Page: VetFarmAllocations,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_ROUTE_FILES_STATE],
    Page: FilesState,
    exact: false,
    props: {},
  },
  {
    path: [
      ROUTE_CITY_VISOR_STATICS,
      ROUTE_CITY_VISOR_STATICS_CHARTS,
      ROUTE_CITY_VISOR_STATICS_PREDICTION,
      ROUTE_CITY_VISOR_STATICS_PREDICTION_VIEW,
    ],
    Page: VisorStatics,
    exact: false,
    props: {},
  },
  {
    path: [
      ROUTE_CITY_DIFFRENCE_KILLER,
      ROUTE_CITY_DIFFRENCE_KILLER_SLAUGHTER,
      ROUTE_CITY_INCREASE_HATCHING,
    ],
    Page: DiffrenceKiller,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_POULTRIES_DETAILS],
    Page: PoultriesDetails,
    exact: false,
    props: {},
  },
];
