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

export type TAccountsRouteNames = 'accounts' | 'account';

export const superAdminUserAccountsNamedRoutes: NamedRoutes<TAccountsRouteNames> = {
  accounts: {
    path: 'accounts',
    loadComponent: () =>
      import('../../views/accounts/list.component').then((m) => m.UserAccountsComponent),
    // @ts-ignore
    meta: {
      title: 'فعالیت اقتصادی',
      pagePath: (userId: string) => `/super_admin/users/${userId}/accounts`,
    },
  },
  account: {
    path: 'accounts/:accountId',
    // loadComponent: () =>
    //   import('../../views/accounts/single.component').then(
    //     (m) => m.,
    //   ),
    // @ts-ignore
    meta: {
      title: 'فعالیت اقتصادی',
      pagePath: (userId: string, businessId: string) =>
        `/super_admin/users/${userId}/accounts/${businessId}`,
    },
  },
};

export const SUPER_ADMIN_USER_ACCOUNTS_ROUTES: Routes = [
  superAdminUserAccountsNamedRoutes.accounts,
  // {
  //   path: superAdminUserAccountsNamedRoutes.account.path,
  //   loadComponent: () =>
  //     import('../../components/accounts/layout.component').then(
  //       (m) => m.SuperAdminUserBusinessActivityLayoutComponent,
  //     ),
  //   children: [
  //     {
  //       path: '',
  //       loadComponent: superAdminUserAccountsNamedRoutes.account.loadComponent,
  //     },
  //   ],
  // },
];
