import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';

import { LayoutsModule } from '@app/layouts/layouts.module';
import { DefaultLayoutComponent } from '@app/layouts/components/default.layout.component';

const routes: Routes = [
  {
    path: '',
    component: DefaultLayoutComponent,
    loadChildren: () =>
      import('./pages/main/main.page.module').then(m => m.MainPageModule)
  },
  {
    path: 'user',
    component: DefaultLayoutComponent,
    loadChildren: () =>
      import('./pages/user/user.page.module').then(m => m.UserPageModule)
  }
];

@NgModule({
  imports: [LayoutsModule, RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule {}
