import { Route } from '@angular/router';
import { AuthGuard } from './auth/auth.guard';
import { LoginViewComponent } from './views/login/login-view.component';
import { MainViewComponent } from './views/main/main-view.component';

export const APP_ROUTES: Route[] = [
  {
    path: '',
    component: LoginViewComponent,
  },
  {
    path: 'app',
    component: MainViewComponent,
    canActivate: [AuthGuard],
    children: [
        {
          path: '',
          loadChildren: () => import('./modules/dashboard/dashboard.routes').then(r => r.DASHBOARD_ROUTES)
        },
        {
          path: 'layers',
          loadChildren: () => import('./modules/layers/layers.routes').then(r=> r.LAYERS_ROUTES)
        },
    ]
  }
];