import {Routes} from '@angular/router';
import {LayoutComponent} from '../layout/layout.component';

export const routes: Routes = [

  {
    path: '',
    component: LayoutComponent,
    children: [
      {path: '', redirectTo: 'home', pathMatch: 'full'},
      {path: 'home', loadChildren: () => import('./home/home.module').then(m => m.HomeModule)},
      {path: 'frame', loadChildren: () => import('./frame/frame.module').then(m => m.FrameModule)},
      {path: 'hmpay', loadChildren: () => import('./hmpay/hmpay.module').then(m => m.HmpayModule)},
      {path: 'weixin', loadChildren: () => import('./weixin/weixin.module').then(m => m.WeixinModule)},
      {path: 'art', loadChildren: () => import('./art/art.module').then(m => m.ArtModule)},
    ]
  },

  // Not lazy-loaded routes
  // { path: 'login', component: LoginComponent },

  // Not found
  {path: '**', redirectTo: 'home'}

];
