import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_AVICULTURE_ARCHIVED_REQUESTS,
  ROUTE_AVICULTURE_AUCTION,
  ROUTE_AVICULTURE_CREATE_NEW_REQUEST,
  ROUTE_AVICULTURE_FILE_ROUTE,
  ROUTE_AVICULTURE_HATCHING,
  ROUTE_AVICULTURE_REJECTED_REQUESTS,
  ROUTE_AVICULTURE_REQUESTS,
  ROUTE_AVICULTURE_ROUTE_HALLS,
  ROUTE_AVICULTURE_TICKET,
  ROUTE_AVICULTURE_VIEW_TICKET,
  ROUTE_AVICULTURE_INSPECTS_ROUTE,
  ROUTE_AVICULTURE_AWAITING_PAYMENT_REQUESTS,
  ROUTE_AVICULTURE_AWAITING_INSPECTION_REQUESTS,
  ROUTE_AVICULTURE_REPORTS,
  ROUTE_AVICULTURE_PRICING,
  ROUTE_AVICULTURE_SUBMIT_REQUEST,
  ROUTE_AVICULTURE_GIVE_PERMISSION,
} from "./routes";

// const AvicultureRequests = lazy(() => import("../pages/AvicultureRequests"));
// const NewFile = lazy(() => import("../pages/NewFile"));
// const Inspects = lazy(() => import("../pages/AvicultureHallInspects"));
// const Auction = lazy(() => import("../pages/Auction"));
// const Tickets = lazy(() => import("../pages/Tickets"));
// const Halls = lazy(() => import("../pages/AvicultureHalls"));

export const avicultureRoutingDefault = "/dashboard/profile";

const AvicultureRequests = lazy(() =>
  lazyRetry(() => import("../pages/AvicultureRequests"))
);
const NewFile = lazy(() => lazyRetry(() => import("../pages/NewFile")));
const Inspects = lazy(() =>
  lazyRetry(() => import("../pages/AvicultureHallInspects"))
);
const Auction = lazy(() => lazyRetry(() => import("../pages/Auction")));
const Tickets = lazy(() => lazyRetry(() => import("../pages/Tickets")));
const Halls = lazy(() => lazyRetry(() => import("../pages/AvicultureHalls")));
const Reports = lazy(() =>
  lazyRetry(() => import("../pages/AvicultureReports"))
);
const AviculturePricing = lazy(() =>
  lazyRetry(() => import("../pages/ProvinceManagePricing"))
);

export const avicultureRouting = [
  // requests routes
  {
    path: [
      ROUTE_AVICULTURE_REQUESTS,
      ROUTE_AVICULTURE_HATCHING,
      ROUTE_AVICULTURE_CREATE_NEW_REQUEST,
      ROUTE_AVICULTURE_REJECTED_REQUESTS,
      ROUTE_AVICULTURE_ARCHIVED_REQUESTS,
      ROUTE_AVICULTURE_AWAITING_PAYMENT_REQUESTS,
      ROUTE_AVICULTURE_AWAITING_INSPECTION_REQUESTS,
      ROUTE_AVICULTURE_SUBMIT_REQUEST,
      ROUTE_AVICULTURE_GIVE_PERMISSION,
    ],
    Page: AvicultureRequests,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_AVICULTURE_AUCTION],
    Page: Auction,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_AVICULTURE_FILE_ROUTE],
    Page: NewFile,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_AVICULTURE_VIEW_TICKET, ROUTE_AVICULTURE_TICKET],
    Page: Tickets,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_AVICULTURE_ROUTE_HALLS],
    Page: Halls,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_AVICULTURE_INSPECTS_ROUTE],
    Page: Inspects,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_AVICULTURE_REPORTS],
    Page: Reports,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_AVICULTURE_PRICING],
    Page: AviculturePricing,
    exact: false,
    props: {},
  },
];
