import { lazy } from "react";
import { lazyRetry } from "../utils/lazyRetry";
import {
  ROUTE_GUILD_ROUTE_DEVICES,
  ROUTE_SENF_INVENTORY,
  ROUTE_SENF_INVENTORY_ENTER,
  ROUTE_SENF_INVENTORY_SEGMENTATION,
  ROUTE_SENF_INVENTORY_STOCK,
} from "./routes";

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

const GuildPspDevices = lazy(() =>
  lazyRetry(() =>
    import("../features/guild/components/guild-psp-devices/GuildPspDevices")
  )
);

export const senfRouting = [
  {
    path: [
      ROUTE_SENF_INVENTORY,
      ROUTE_SENF_INVENTORY_STOCK,
      ROUTE_SENF_INVENTORY_SEGMENTATION,
      ROUTE_SENF_INVENTORY_ENTER,
    ],
    Page: SenfInventoryPage,
    exact: false,
    props: {},
  },
  {
    path: [ROUTE_GUILD_ROUTE_DEVICES],
    Page: GuildPspDevices,
    exact: false,
    props: {},
  },
];
