import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { NgxDatatableModule } from '@swimlane/ngx-datatable';

import { NgSelectModule } from '@ng-select/ng-select';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { ClipboardModule } from 'ngx-clipboard';
import { CardModule } from '../../partials/general/card/card.module';
import { BreadcrumbModule } from 'src/app/_layout/breadcrumb/breadcrumb.module';
import { BlockUIModule } from 'ng-block-ui';
import { BlockTemplateComponent } from '../../../_layout/blockui/block-template.component';
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import { ListMonitoringComponent } from './list-monitoring.component';
import { AddEditListComponent } from './add-edit-list/add-edit-list.component';



@NgModule({
  declarations: [
    ListMonitoringComponent,
    AddEditListComponent
  ],
  imports: [
    CommonModule,
    CardModule,
    BreadcrumbModule,
    NgSelectModule,
    FormsModule,
    ReactiveFormsModule,
    ClipboardModule,
    PerfectScrollbarModule,
    NgxDatatableModule,
    BlockUIModule.forRoot({
      template: BlockTemplateComponent
    }),
    RouterModule.forChild([
      {
        path: '',
        component: ListMonitoringComponent
      },
      {
        path: 'add-row',
        component: AddEditListComponent,
        data: { mode: 'add' }
      },
      {
        path: 'edit/:id',
        component: AddEditListComponent,
        data: { mode: 'edit' } 
      },
      {
        path: 'view/:id',
        component: AddEditListComponent,
        data: { mode: 'view' } 
      }
    ])
  ]
})
export class ListMonitoringModule { }
