import { ModuleClientParams } from "@erp/core/client"; import { lazy } from "react"; import { Outlet, RouteObject } from "react-router-dom"; // Lazy load components const CustomersLayout = lazy(() => import("./components").then((m) => ({ default: m.CustomersLayout })) ); const CustomersList = lazy(() => import("./pages").then((m) => ({ default: m.CustomersList }))); const CustomerAdd = lazy(() => import("./pages").then((m) => ({ default: m.CustomerCreate }))); //const LogoutPage = lazy(() => import("./app").then((m) => ({ default: m.LogoutPage }))); /*const DealerLayout = lazy(() => import("./app").then((m) => ({ default: m.DealerLayout }))); const DealersList = lazy(() => import("./app").then((m) => ({ default: m.DealersList }))); const LoginPageWithLanguageSelector = lazy(() => import("./app").then((m) => ({ default: m.LoginPageWithLanguageSelector })) ); const CustomerEdit = lazy(() => import("./app").then((m) => ({ default: m.CustomerEdit }))); const SettingsEditor = lazy(() => import("./app").then((m) => ({ default: m.SettingsEditor }))); const SettingsLayout = lazy(() => import("./app").then((m) => ({ default: m.SettingsLayout }))); const CatalogLayout = lazy(() => import("./app").then((m) => ({ default: m.CatalogLayout }))); const CatalogList = lazy(() => import("./app").then((m) => ({ default: m.CatalogList }))); const DashboardPage = lazy(() => import("./app").then((m) => ({ default: m.DashboardPage }))); const CustomersLayout = lazy(() => import("./app").then((m) => ({ default: m.CustomersLayout }))); const CustomersList = lazy(() => import("./app").then((m) => ({ default: m.CustomersList })));*/ export const CustomerRoutes = (params: ModuleClientParams): RouteObject[] => { return [ { path: "customers", element: ( ), children: [ { path: "", index: true, element: }, // index { path: "list", element: }, { path: "create", element: }, // /*{ path: "create", element: }, { path: ":id", element: }, { path: ":id/edit", element: }, { path: ":id/delete", element: }, { path: ":id/view", element: }, { path: ":id/print", element: }, { path: ":id/email", element: }, { path: ":id/download", element: }, { path: ":id/duplicate", element: }, { path: ":id/preview", element: },*/ ], }, ]; };