import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { TabsPage } from './tabs.page';

const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      {
        path: 'tab1',
        loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)
      },
      {
        path: 'tab2',
        loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
      },
      {
        path: 'mine',
        loadComponent: () =>
          import('../../lib/user/page-mine/page-mine.component').then((m) => m.PageMineComponent),
      },
      {
        path: '',
        redirectTo: '/tabs/tab1',
        pathMatch: 'full'
      },
      {
        path: 'demo/book/list',       
        loadComponent: () =>
          import('../../modules/demo/book/page-book-list/page-book-list.component').then((m) => m.PageBookListComponent),
      },
      {
        path: 'demo/book/display/:bookId',       
        loadComponent: () =>
          import('../../modules/demo/book/page-book-display/page-book-display.component').then((m) => m.PageBookDisplayComponent),
      },
      
    ]
  },
  {
    path: '',
    redirectTo: '/tabs/tab1',
    pathMatch: 'full'
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
})
export class TabsPageRoutingModule {}
