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

export type TConsumerAccountPermissionsRouteNames = 'permissions';

export const consumerAccountPermissionsNamedRoutes: NamedRoutes<TConsumerAccountPermissionsRouteNames> =
  {
    permissions: {
      path: 'permissions',
      loadComponent: () =>
        import('../../views/permissions/list.component').then(
          (m) => m.ConsumerAccountPermissionsComponent,
        ),
      meta: {
        title: 'سطح دسترسی',
        pagePath: (accountId: string) => `/consumer/accounts/${accountId}/permissions`,
      },
    },
  };

export const CONSUMER_ACCOUNT_PERMISSIONS_ROUTES: Routes = Object.values(
  consumerAccountPermissionsNamedRoutes,
);
