import {Routes} from '@angular/router';
import {AuthLayoutComponent} from './core';
import {AdminLayoutComponent} from './core/admin-layout/admin-layout.component';
import {AuthGuard} from './classes/guards/auth.guard';

export const AppRoutes: Routes = [{
  path: '',
  canActivate: [AuthGuard],
  component: AdminLayoutComponent,
  children: [{
    canActivate: [AuthGuard],
    path: 'user',
    loadChildren: './components/user/user.module#UserModule'
  },
  ]
}, {
  path: '',
  component: AuthLayoutComponent,
  children: [{
    path: 'auth',
    loadChildren: './components/auth/auth.module#AuthModule'
  }]
}, {
  path: '**',
  redirectTo: 'auth/404'
}];
