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

export type TProvidersRouteNames = 'providers' | 'provider';

export const providersNamedRoutes: NamedRoutes<TProvidersRouteNames> = {
  providers: {
    path: 'providers',
    loadComponent: () => import('../../views/list.component').then((m) => m.ProvidersComponent),
    meta: {
      title: 'ارایه‌دهندگان',
      pagePath: () => '/super_admin/providers',
    },
  },
  provider: {
    path: 'providers/:providerId',
    loadComponent: () => import('../../views/single.component').then((m) => m.ProviderComponent),
    meta: {
      title: 'ارایه‌دهنده',
      pagePath: () => '/super_admin/providers/:providerId',
    },
  },
};

export const PROVIDERS_ROUTES: Routes = Object.values(providersNamedRoutes);
