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: 'history/:id',
        loadChildren: () => import('../history/history.module').then(m => m.HistoryPageModule)
      },
      {
        path: 'allowance',
        loadChildren: () => import('../allowance/allowance.module').then(m => m.AllowancePageModule)
      },
      {
        path: 'tasks',
        loadChildren: () => import('../tasks/tasks.module').then(m => m.TasksPageModule),
      },
      {
        path: '',
        redirectTo: '/tabs/allowance',
        pathMatch: 'full'
      }
    ]
  },
  {
    path: '',
    redirectTo: '/tabs/allowance',
    pathMatch: 'full'
  }
];

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