import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';

import { IonicModule } from '@ionic/angular';

import { PostulationsPage } from './postulations.page';

const routes: Routes = [
  {
        path: '',
        redirectTo: '/postulations/current',
        pathMatch: 'full'
  },
  {
    path: '',
    component: PostulationsPage,
    children: [
      {
        path: 'current',
        loadChildren: () => import('./current/current.module').then(m => m.CurrentPageModule)
      },
      {
        path: 'already',
        loadChildren: () => import('./already/already.module').then(m => m.AlreadyPageModule)
      },
      {
        path: 'ended',
        loadChildren: () => import('./ended/ended.module').then(m => m.EndedPageModule)
      },
      {
        path: 'reported',
        loadChildren: () => import('./reported/reported.module').then(m => m.PostulationReportedPageModule)
      }
    ]
  }
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    RouterModule.forChild(routes)
  ],
  declarations: [PostulationsPage]
})
export class PostulationsPageModule {}
