import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_PROVINCE_FINANCIAL_ARCHIVED_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_FILE_ROUTE,
  ROUTE_PROVINCE_FINANCIAL_NEW_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_REJECTED_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_TICKET,
  ROUTE_PROVINCE_FINANCIAL_VIEW_TICKET,
  ROUTE_PROVINCE_PRICING,
  ROUTE_PROVINCE_FINANCIAL_ROUTE_DEBT,
  ROUTE_PROVINCE_FINANCIAL_COMPLAINTS,
  ROUTE_PROVINCE_FINANCIAL_DOCUMENT_REGISTRATION,
  ROUTE_PROVINCE__FINANCIAL_USER_FINACIAL_FILE_ROUTE,
  ROUTE_PROVINCE_FINANCIAL_AWAITING_PAYMENT_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_AWAITING_INSPECTION_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_STATICS,
  ROUTE_PROVINCE_PRICING3,
  ROUTE_PROVINCE_FINANCIAL_PENDING_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_CHECK_PAYED_FACTOR_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_FINAL_FACTORS_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_SETTLEMENT,
  ROUTE_PROVINCE_FINANCIAL_ACTIVE_REQUESTS,
  ROUTE_PROVINCE_FINANCIAL_TRANSACTIONS,
  ROUTE_PROVINCE_FINANCIAL_SUB_SECTORS_WAGE,
  ROUTE_PROVINCE_FINANCIAL_SUB_SECTORS_CITY_SHARES,
  ROUTE_PROVINCE_FINANCIAL_SUB_SECTORS_STEWARD_SHARES,
  ROUTE_PROVINCE_FINANCIAL_SUB_SECTORS_VET_FARM_SHARES,
  ROUTE_PROVINCE_FINANCIAL_TRANSACTIONS_VIEW,
} from "./routes";

const ProvinceFinancial = lazy(() =>
  lazyRetry(() => import("../pages/ProvinceFinancial"))
);
// const File = lazy(() => lazyRetry(() => import("../pages/File")));
const NewFile = lazy(() => lazyRetry(() => import("../pages/NewFile")));
const ProvinceManagePricing = lazy(() =>
  lazyRetry(() => import("../pages/ProvinceManagePricing"))
);
const Tickets = lazy(() => lazyRetry(() => import("../pages/Tickets")));
const Debts = lazy(() =>
  lazyRetry(() => import("../pages/ProvinceFinancialDebts"))
);
const Complaints = lazy(() =>
  lazyRetry(() => import("../pages/ProvinceFinancialComplaints"))
);
const DoucumentRegister = lazy(() =>
  lazyRetry(() => import("../pages/ProvinceFinancialDocumentRegister"))
);
const Statics = lazy(() => lazyRetry(() => import("../pages/AdminStatics")));

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

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

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

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

export const provinceFinancialRouting = [
  {
    path: [
      ROUTE_PROVINCE_FINANCIAL_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_REJECTED_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_ARCHIVED_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_NEW_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_AWAITING_PAYMENT_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_AWAITING_INSPECTION_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_PENDING_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_CHECK_PAYED_FACTOR_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_FINAL_FACTORS_REQUESTS,
      ROUTE_PROVINCE_FINANCIAL_ACTIVE_REQUESTS,
    ],
    Page: ProvinceFinancial,
    exact: false,
    props: {},
  },
  {
    path: [
      ROUTE_PROVINCE_FINANCIAL_SUB_SECTORS_WAGE,
      ROUTE_PROVINCE_FINANCIAL_SUB_SECTORS_CITY_SHARES,
      ROUTE_PROVINCE_FINANCIAL_SUB_SECTORS_STEWARD_SHARES,
      ROUTE_PROVINCE_FINANCIAL_SUB_SECTORS_VET_FARM_SHARES,
    ],
    Page: SubSectorWage,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_PROVINCE_FINANCIAL_FILE_ROUTE],
    Page: NewFile,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_PROVINCE_PRICING],
    Page: ProvinceManagePricing,
    exact: false,
    props: {},
  },
  {
    path: [
      ROUTE_PROVINCE_FINANCIAL_VIEW_TICKET,
      ROUTE_PROVINCE_FINANCIAL_TICKET,
    ],
    Page: Tickets,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_PROVINCE_FINANCIAL_ROUTE_DEBT],
    Page: Debts,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_PROVINCE_FINANCIAL_COMPLAINTS],
    Page: Complaints,
    exact: false,
    props: {},
  },
  {
    path: [
      ROUTE_PROVINCE_FINANCIAL_DOCUMENT_REGISTRATION,
      ROUTE_PROVINCE__FINANCIAL_USER_FINACIAL_FILE_ROUTE,
    ],
    Page: DoucumentRegister,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_PROVINCE_FINANCIAL_STATICS],
    Page: Statics,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_PROVINCE_PRICING3],
    Page: ProvincePricing,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_PROVINCE_FINANCIAL_SETTLEMENT],
    Page: ProvinceSettlementPage,
    exact: false,
    props: {},
  },
  {
    path: [
      ROUTE_PROVINCE_FINANCIAL_TRANSACTIONS,
      ROUTE_PROVINCE_FINANCIAL_TRANSACTIONS_VIEW,
    ],
    Page: TransactionsPage,
    exact: false,
    props: {},
  },
];
