import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_CITY_COMMERCE_ROUTE_ALLOCATIONS,
  ROUTE_CITY_COMMERCE_ROUTE_FILES_STATE,
  ROUTE_CITY_COMMERCE_ROUTE_GUILDS,
  ROUTE_CITY_COMMERCE_ROUTE_GUILDS_SETTINGS,
  ROUTE_CITY_COMMERCE_ROUTE_MANAGE_GUILDS,
  ROUTE_CITY_COMMERCE_ROUTE_STEWARDS,
} from "./routes";

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

export const cityCommerceRouting = [
  {
    path: [
      ROUTE_CITY_COMMERCE_ROUTE_MANAGE_GUILDS,
      ROUTE_CITY_COMMERCE_ROUTE_GUILDS,
      ROUTE_CITY_COMMERCE_ROUTE_STEWARDS,
      ROUTE_CITY_COMMERCE_ROUTE_GUILDS_SETTINGS,
    ],
    Page: Guilds,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_COMMERCE_ROUTE_FILES_STATE],
    Page: FilesState,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_CITY_COMMERCE_ROUTE_ALLOCATIONS],
    Page: VetFarmAllocations,
    exact: false,
    props: {},
  },
];
