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 { ContractsPage } from './contracts.page';
import { TranslateModule } from '@ngx-translate/core'

const routes: Routes = [
  {
        path: '',
        redirectTo: '/contracts/pending',
        pathMatch: 'full'
  },
  {
    path: '',
    component: ContractsPage,
    children: [
      {
        path: 'pending',
        loadChildren: './pending/pending.module#PendingPageModule'
      },
      {
        path: 'redated',
        loadChildren: './redated/redated.module#RedatedPageModule'
      },
      {
        path: 'contracted',
        loadChildren: './contracted/contracted.module#ContractedPageModule'
      },
      {
        path: 'finished',
        loadChildren: './finished/finished.module#FinishedPageModule'
      }
    ]
  }
];

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