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: 'home',
        loadChildren: () => import('../home/home.module').then(m => m.HomePageModule)
      },
        {
          path: "timer",
          loadChildren: () => import('../../modules/tab/tree/tree.module').then(mod => mod.TreePageModule)
        },
      {
        path: 'memo',
        loadChildren: () => import('../memo/memo.module').then(m => m.MemoPageModule)
      },
      {
        path: 'chatpage',
        loadChildren: () => import('../chatpage/chatpage.module').then( m => m.ChatpagePageModule)
      }, 
        {
          path: 'chat',
          loadChildren: () => import('../child-page/chat/chat.module').then(m => m.ChatPageModule)
        },
      {
        path: 'mine',
        loadChildren: () => import('../mine/mine.module').then(m => m.MinePageModule)
      },
        {
          path: 'go-load',
          loadChildren: () => import('../../modules/user/mine/mine.module').then(mod => mod.MinePageModule)
        },
        {
          path: 'bounty-store',
          loadChildren: () => import('../child-page/bounty-store/bounty-store.module').then(mod => mod.BountyStorePageModule)
        },
      {
        path: '',
        redirectTo: '/tabs/home',
        pathMatch: 'full'
      }
    ]
  },
  {
    path: '',
    redirectTo: '/tabs/home',
    pathMatch: 'full'
  }
];

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