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

const routes: Routes = [
  {
    path: ':id',
    component: AllowancePage,
  },
  {
    path: ':id/add',
    loadChildren: () => import('../edit-allowance/edit-allowance.module').then(m => m.EditAllowancePageModule)
  },
  {
    path: ':id/edit/:goalId',
    loadChildren: () => import('../edit-allowance/edit-allowance.module').then(m => m.EditAllowancePageModule)
  },
  {
    path: ':id/increase/:goalId',
    loadChildren: () => import('../add-allowance/add-allowance.module').then(m => m.AddAllowancePageModule)
  },
  {
    path: ':id/spend/:goalId',
    loadChildren: () => import('../add-allowance/spend-allowance.module').then(m => m.SpendAllowancePageModule)
  }
];

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