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

export type TLicensesRouteNames = 'licenses' | 'license';

export const licensesNamedRoutes: NamedRoutes<TLicensesRouteNames> = {
  licenses: {
    path: 'licenses',
    loadComponent: () => import('../../views/list.component').then((m) => m.LicensesComponent),
    meta: {
      title: 'لایسنس‌ها',
      pagePath: () => '/super_admin/licenses',
    },
  },
  license: {
    path: 'licenses/:licenseId',
    loadComponent: () => import('../../views/single.component').then((m) => m.LicenseComponent),
    meta: {
      title: 'لایسنس',
      pagePath: () => '/super_admin/licenses/:licenseId',
    },
  },
};

export const LICENSES_ROUTES: Routes = Object.values(licensesNamedRoutes);
