import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { FormsModule } from "@angular/forms";
import { Routes, RouterModule } from "@angular/router";
import { AbsenceListService } from "./service/service.service";
import { IonicModule } from "@ionic/angular";
import { SubmitAbsenceService } from "./service/submit.absence.service";
import { AbsencePage } from "./absence.page";
import { DatePicker } from "@ionic-native/date-picker/ngx";
import { HomeComponent } from "./home/home.component";
import { SubmitAbsenceComponent } from "./submit-absence/submit-absence.component";
import { replacmentListService } from "./service/replacement-list.service";
import { HmgCommonModule } from "./../hmg-common/hmg-common.module";
import { ReplacementListComponent } from "../vacation-rule/replacement-list/replacement-list.component";
import { AbsenceConfirmComponent } from "./absence-confirm/absence-confirm.component";
import { ConfirmAddEitService } from "./service/confirm-add-eit-service";
import { SubmitAbConfirmService } from "./service/submit-absence-confirm.service";
import { WorklistAttachService } from "./service/work-list-attach.service";
import { AbsenceAttachmentComponent } from "./absence-attachment/absence-attachment.component";
import { AddAttachService } from "./service/add-attach-service";
import { WorkListAttachViewComponent } from "src/app/notification/work-list-attach-view/work-list-attach-view.component";
import { ViewAttachmentsComponent } from './view-attachments/view-attachments.component';
const routes: Routes = [
  {
    path: "",
    component: AbsencePage,
    children: [
      {
        path: "home",
        component: HomeComponent
      },
      {
        path: "submit-absence",
        component: SubmitAbsenceComponent
      },
      {
        path: "replacement-list",
        component: ReplacementListComponent
      },
      {
        path: "confirm-absence",
        component: AbsenceConfirmComponent
      },
      {
        path: "absence-attachment",
        component: AbsenceAttachmentComponent
      },
      {
        path: "worklist-attachment",
        component: WorkListAttachViewComponent
      },
      {
        path:'view-attachements',
        component:ViewAttachmentsComponent
      }
    ]
  }
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    HmgCommonModule,
    RouterModule.forChild(routes)
  ],
  providers: [
    AbsenceListService,
    SubmitAbsenceService,
    replacmentListService,
    WorklistAttachService,
    SubmitAbConfirmService,
    DatePicker,
    ConfirmAddEitService,
    AddAttachService
  ],
  declarations: [
    AbsencePage,
    HomeComponent,
    SubmitAbsenceComponent,
    AbsenceConfirmComponent,
    AbsenceAttachmentComponent,
    ViewAttachmentsComponent
  ]
})
export class AbsencePageModule {}
