import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';

import { AppComponent } from './app.component';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { SharedModule } from './components/resources/shared/shared.module';
import { APP_ROUTING } from 'src/app/app.routes';
import { HashLocationStrategy, LocationStrategy } from '@angular/common';

// Components
import { IAMComponent } from './components/iam/iam.component';
import { MCOMPVComponent } from './components/mco/mcompv/mcompv.component';
import { MCOMUNComponent } from './components/mco/mcomun/mcomun.component';
import { MCOMAUComponent } from './components/mco/mcomau/mcomau.component';
import { MCOMORComponent } from './components/mco/mcomor/mcomor.component';
import { MCOMDFComponent } from './components/mco/mcomdf/mcomdf.component';
import { MCOMBAComponent } from './components/mco/mcomba/mcomba.component';
import { MESMPRComponent } from './components/mes/mesmpr/mesmpr.component';
import { MESMSVComponent } from './components/mes/mesmsv/mesmsv.component';
import { MESMAVComponent } from './components/mes/mesmav/mesmav.component';
import { MESMHSComponent } from './components/mes/mesmhs/mesmhs.component';
import { MESMCVComponent } from './components/mes/mesmcv/mesmcv.component';
import { MESMREComponent } from './components/mes/mesmre/mesmre.component';
import { MESMCCComponent } from './components/mes/mesmcc/mesmcc.component';
import { AlertaComponent } from './components/resources/dialogos/alerta/alerta.component';
import { PAGE404Component } from './components/resources/page404/page404.component';
import { MCOMAUFORMComponent } from './components/mco/mcomau/mcomau-form/mcomau-form.component';
import { CambiarContrasenaComponent } from './components/resources/dialogos/cambiar-contrasena/cambiar-contrasena.component';
import { MCOMDFFORMComponent } from './components/mco/mcomdf/mcomdf-form/mcomdf-form.component';
import { MCOMPVFORMComponent } from './components/mco/mcompv/mcompv-form/mcompv-form.component';
import { MCOMAUINFOComponent } from './components/mco/mcomau/mcomau-info/mcomau-info.component';
import { MCOMUNFORMComponent } from './components/mco/mcomun/mcomun-form/mcomun-form.component';
import { MCOMORFORMComponent } from './components/mco/mcomor/mcomor-form/mcomor-form.component';
import { MESMHSFORMComponent } from './components/mes/mesmhs/mesmhs-form/mesmhs-form.component';
import { MESMCVFORMComponent } from './components/mes/mesmcv/mesmcv-form/mesmcv-form.component';
import { VERSOLICITUDComponent } from './components/resources/dialogos/ver-solicitud/ver-solicitud.component';
import { MCOComponent } from './components/mco/mco.component';
import { MESComponent } from './components/mes/mes.component';
import { MESMAVFORMComponent } from './components/mes/mesmav/mesmav-form/mesmav-form.component';
import { INFORMACIONSOLICITUDComponent } from './components/resources/dialogos/informacion-solicitud/informacion-solicitud.component';
import { MCOMDFMOTIVOComponent } from './components/mco/mcomdf/mcomdf-motivo/mcomdf-motivo.component';
import { MCOMAPComponent } from './components/mco/mcomap/mcomap.component';
import { MCOMAPFORMComponent } from './components/mco/mcomap/mcomap-form/mcomap-form.component';
import { VerDiasVacacionalesComponent } from './components/mco/mcompv/ver-dias-vacacionales/ver-dias-vacacionales.component';
import { VerDiasEarnasyougoComponent } from './components/mco/mcompv/ver-dias-earnasyougo/ver-dias-earnasyougo.component';
import { VerDiasDescansoComponent } from './components/mco/mcompv/ver-dias-descanso/ver-dias-descanso.component';
import { DEFAULT_TIMEOUT, ServerErrorInterceptor } from './services/interceptors/server-error-interceptor.interceptor';
import { HTTP_INTERCEPTORS } from '@angular/common/http';

import { SocketIoModule, SocketIoConfig } from 'ngx-socket-io';
import { FooterComponent } from './components/resources/footer/footer.component';
import { ToolbarComponent } from './components/resources/toolbar/toolbar.component';

//const config: SocketIoConfig = { url: 'http://localhost:4444', options: { transports: ['websocket']} };

@NgModule({
  declarations: [
    AppComponent,
    IAMComponent,
    MCOMPVComponent,
    MCOMUNComponent,
    MCOMAUComponent,
    MCOMORComponent,
    MCOMDFComponent,
    MCOMBAComponent,
    MESMPRComponent,
    MESMSVComponent,
    MESMAVComponent,
    MESMHSComponent,
    MESMCVComponent,
    MESMREComponent,
    MESMCCComponent,
    AlertaComponent,
    PAGE404Component,
    MCOMAUFORMComponent,
    CambiarContrasenaComponent,
    MCOMDFFORMComponent,
    MCOMPVFORMComponent,
    MCOMAUINFOComponent,
    MCOMUNFORMComponent,
    MCOMORFORMComponent,
    MESMHSFORMComponent,
    MESMCVFORMComponent,
    VERSOLICITUDComponent,
    MCOComponent,
    MESComponent,
    MESMAVFORMComponent,
    INFORMACIONSOLICITUDComponent,
    MCOMDFMOTIVOComponent,
    MCOMAPComponent,
    MCOMAPFORMComponent,
    VerDiasVacacionalesComponent,
    VerDiasEarnasyougoComponent,
    VerDiasDescansoComponent,
    FooterComponent,
    ToolbarComponent,
  ],
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    SharedModule,
    APP_ROUTING,
    /* SocketIoModule.forRoot(config) */
  ],
  providers: [
    [{ provide: HTTP_INTERCEPTORS, useClass: ServerErrorInterceptor, multi: true }],
    [{ provide: DEFAULT_TIMEOUT, useValue: 5000 }],
    {provide: LocationStrategy, useClass: HashLocationStrategy}
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
