import type { ModuleClientParams } from "@erp/core/client";
import { lazy } from "react";
import { Outlet, type RouteObject } from "react-router-dom";
const ProformaLayout = lazy(() =>
import("./proformas/shared/ui").then((m) => ({ default: m.ProformaLayout }))
);
const ProformasListPage = lazy(() =>
import("./proformas/list").then((m) => ({ default: m.ListProformasPage }))
);
/*const ProformasCreatePage = lazy(() =>
import("./proformas/create").then((m) => ({ default: m.ProformaCreatePage }))
);*/
const ProformaUpdatePage = lazy(() =>
import("./proformas/update").then((m) => ({ default: m.ProformaUpdatePage }))
);
const IssuedInvoicesLayout = lazy(() =>
import("./issued-invoices/shared/ui").then((m) => ({ default: m.IssuedInvoicesLayout }))
);
const IssuedInvoiceListPage = lazy(() =>
import("./issued-invoices/list").then((m) => ({ default: m.ListIssuedInvoicesPage }))
);
export const CustomerInvoiceRoutes = (params: ModuleClientParams): RouteObject[] => {
return [
{
path: "proformas",
handle: {
layout: "app-sidebar",
protected: true,
},
element: (
),
children: [
{
index: true,
element: ,
},
{
path: "list",
element: ,
},
],
},
{
path: "proformas/:id/edit",
handle: {
layout: "app-fullscreen",
protected: true,
},
element: ,
},
{
path: "customer-invoices",
handle: {
layout: "app-sidebar",
protected: true,
},
element: (
),
children: [
{ path: "", index: true, element: }, // index
{ path: "list", element: },
/*
{ path: "create", element: },
{ path: ":id", 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: },
*/
],
},
];
};