import { ExtraOptions, Routes } from '@angular/router';
import { RedirectGuard } from '@core/guards';
import { AppLayout } from '../../layout/component/app.layout';

export const routerOptions: ExtraOptions = {
  anchorScrolling: 'enabled',
  scrollPositionRestoration: 'enabled',
  paramsInheritanceStrategy: 'always',
};

export const mainRoutes: Routes = [
  {
    path: '',
    component: AppLayout,
    canActivate: [RedirectGuard],
    children: [],
  },
  // {
  //   path: 'dashboard',
  //   component: AppLayout,
  //   loadChildren: () =>
  //     import('./dashboard/dashboard.routes').then((r) => r.dashboardRoutes),
  // },
  // {
  //   path: 'cruscotti',
  //   component: AppLayout,
  //   loadChildren: () =>
  //     import('./cruscotti/cruscotti.routes').then((r) => r.cruscottiRoutes),
  // },
  // {
  //   path: 'report',
  //   component: AppLayout,
  //   loadChildren: () =>
  //     import('./report/report.routes').then((r) => r.reportRoutes),
  // },
  {
    path: 'utenti',
    component: AppLayout,
    loadChildren: () =>
      import('./utenti/utenti.routes').then((r) => r.utentiRoutes),
  },
  {
    path: 'ruoli',
    component: AppLayout,
    loadChildren: () =>
      import('./ruoli/ruoli.routes').then((r) => r.ruoliRoutes),
  },
  // {
  //   path: 'nomenclatore',
  //   component: AppLayout,
  //   loadChildren: () =>
  //     import('./nomenclatore/nomenclatore.routes').then(
  //       (r) => r.nomenclatoreRoutes,
  //     ),
  // },
  {
    path: 'gestisci-profilo',
    component: AppLayout,
    loadChildren: () =>
      import('./gestisci-profilo/gestisci-profilo.routes').then(
        (r) => r.gestisciProfiloRoutes,
      ),
  },

  {
    path: 'strutture',
    component: AppLayout,
    loadChildren: () =>
      import('./strutture/strutture.routes').then((r) => r.struttureRoutes),
  },
  // {
  //   path: 'jobs',
  //   component: AppLayout,
  //   loadChildren: () => import('./jobs/jobs.routes').then((r) => r.jobsRoutes),
  // },
];
