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 { TimeCardPage } from './time-card.page';
import { TimeCardDetailsComponent } from './time-card-details/time-card-details.component';
import { HomeComponent } from './home/home.component';
import { SelectPeriodComponent } from './select-period/select-period.component';
import { ShiftDetailsComponent } from './shift-details/shift-details.component';
import { HmgCommonModule } from '../hmg-common/hmg-common.module';



const routes: Routes = [
  {
    path: '',
    component: TimeCardPage,
    children: [
      {
        path: 'home',
        component: HomeComponent
      },
      {
        path: 'time-card-details',
        component: TimeCardDetailsComponent
      },
      {
        path: 'shift-details',
        component: ShiftDetailsComponent
      }
    ]
  }
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    RouterModule.forChild(routes),
    HmgCommonModule
  ],
  declarations: [
    TimeCardPage,
    HomeComponent,
    TimeCardDetailsComponent,
    SelectPeriodComponent,
    ShiftDetailsComponent
  ],
  entryComponents: [
    SelectPeriodComponent
  ],
})
export class TimeCardPageModule {}
