import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';

import { ChartistModule } from 'ng-chartist';
import { NgxDatatableModule } from '@swimlane/ngx-datatable';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgbDatepickerModule, NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { CardModule } from '../../../content/partials/general/card/card.module';
import { NgChartsModule } from 'ng2-charts';
import { BlockUIModule } from 'ng-block-ui';
import { BlockTemplateComponent } from '../../../_layout/blockui/block-template.component';
import { MatchHeightModule } from '../../../content/partials/general/match-height/match-height.module';
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import { BuildingComponent } from './building/building.component';
import { RoomComponent } from './room/room.component';
import { BreadcrumbModule } from 'src/app/_layout/breadcrumb/breadcrumb.module';
import { AddNewBuildingRoomComponent } from './add-new-building-room/add-new-building-room.component';
import { ArchwizardModule } from 'angular-archwizard';
import { DetailComponent } from './detail/detail.component';

@NgModule({
  declarations: [
    BuildingComponent,
    RoomComponent,
    AddNewBuildingRoomComponent,
    DetailComponent
  ],
  imports: [
    CommonModule,
    ReactiveFormsModule,
    ChartistModule,
    FormsModule,
    NgChartsModule,
    CardModule,
    MatchHeightModule,
    NgxDatatableModule,
    PerfectScrollbarModule,
    NgbDatepickerModule,
    ArchwizardModule,
    BreadcrumbModule,
    NgbModule,
    BlockUIModule.forRoot({
      template: BlockTemplateComponent
    }),
    RouterModule.forChild([
      {
        path: '',
        component: BuildingComponent,
      },
      {
        path: 'monitoring-room',
        component: RoomComponent
      },
      {
        path: 'add-new-room',
        component: AddNewBuildingRoomComponent,
        data: { mode: 'room' }
      },
      {
        path: 'add-new-building',
        component: AddNewBuildingRoomComponent,
        data: { mode: 'build' }
      },
      {
        path: 'edit-new-building/:id',
        component: AddNewBuildingRoomComponent,
        data: { mode: 'build' }
      },
      {
        path: 'view-new-building/:id',
        component: DetailComponent,
        data: { mode: 'build' }
      },
    ])
  ]
})
export class MonitoringModule { }
