import { NamedRoutes } from '@/core';
import { Routes } from '@angular/router';

export type TPublicSaleInvoicesRouteNames = 'saleInvoice';

export const publicSaleInvoicesNamedRoutes: NamedRoutes<TPublicSaleInvoicesRouteNames> = {
  saleInvoice: {
    path: 'sale-invoices/:invoiceId',
    loadComponent: () =>
      import('../../views/single.component').then((m) => m.PublicSaleInvoiceComponent),
    meta: {
      title: 'جزئیات فاکتور',
      pagePath: (invoiceId: string) => `sale-invoices/${invoiceId}`,
    },
  },
};

export const PUBLIC_SALE_INVOICES_ROUTES: Routes = [publicSaleInvoicesNamedRoutes.saleInvoice];
