import { UnavailableGuard } from './guards/unavailable.guard';
import { AppRoutesModule } from './../app-routes.module';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HeaderComponent } from './header/header.component';
import { CoreMaterialModule } from './core-material.module';
import { UserRoleGuard } from './guards/user-role.guard';
import { AdminRoleGuard } from './guards/admin-role.guard';
import { AnalystRoleGuard } from './guards/analyst-role.guard';
import { CookieService } from 'ngx-cookie-service';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { UnavailableComponent } from './unavailable/unavailable.component';
import { ConfirmDialogComponent } from './confirm-dialog/confirm-dialog.component';
import { InfoDialogComponent } from './info-dialog/info-dialog.component';
import { NavigationComponent } from './navigation/navigation.component';
import { AuthInterceptor } from './interceptors/auth.interceptor';
import { HomeComponent } from './home/home.component';

@NgModule({
  declarations: [
    HeaderComponent,
    NavigationComponent,
    UnavailableComponent,
    ConfirmDialogComponent,
    InfoDialogComponent,
    HomeComponent
  ],
  imports: [
    CommonModule,
    AppRoutesModule,
    CoreMaterialModule,
  ],
  entryComponents: [
    ConfirmDialogComponent,
    InfoDialogComponent
  ],
  providers: [
    UnavailableGuard,
    AdminRoleGuard,
    AnalystRoleGuard,
    UserRoleGuard,
    CookieService,
    { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }
  ],
  exports: [
    HeaderComponent,
    NavigationComponent
  ]
})
export class CoreModule { }
