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

import {NgbModule} from '@ng-bootstrap/ng-bootstrap';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';

import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { AuthService, AuthInterceptor, AuthGuard } from './services/auth.service';

import { LoginComponent } from './components/login/login.component';
import { SignupComponent } from './components/singup/singup.component';
import { AddBoilerplateComponent } from './components/add-boilerplate/add-boilerplate.component';
import { BoilerplateDetailsComponent } from './components/boilerplate-details/boilerplate-details.component';
import { BoilerplateListComponent } from './components/boilerplate-list/boilerplate-list.component';
import { AddPrefixComponent } from './components/add-prefix/add-prefix.component';
import { PrefixDetailsComponent } from './components/prefix-details/prefix-details.component';
import { PrefixListComponent } from './components/prefix-list/prefix-list.component';
import { NotifierModule } from "angular-notifier";
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import {MaterialModule} from './mat-module';
import { FlexLayoutModule } from '@angular/flex-layout';

import { HeaderComponent } from './navigation/header/header.component';
import { SidenavListComponent } from './navigation/sidenav-list/sidenav-list.component';
import { MainListComponent } from './components/main-list/main-list.component';
import { MainDetailsComponent } from './components/main-details/main-details.component';
import { SuffixListComponent } from './components/suffix-list/suffix-list.component';
import { SuffixDetailsComponent } from './components/suffix-details/suffix-details.component';
import { GroupboilComponent } from './components/groupboil/groupboil.component';
import { AddGroupboilComponent } from './components/add-groupboil/add-groupboil.component';
import { InstancesListComponent } from './components/instances-list/instances-list.component';
import { Ng2SearchPipeModule } from 'ng2-search-filter';
import { NgxEchartsModule } from 'ngx-echarts';
import { CourseDialogComponentComponent } from './components/course-dialog-component/course-dialog-component.component';

import {APP_BASE_HREF} from '@angular/common';



@NgModule({
  imports: [
    BrowserModule,
    AppRoutingModule,
    FormsModule,
    ReactiveFormsModule,
    Ng2SearchPipeModule,
    HttpClientModule,
    NgbModule,
    NotifierModule,
    BrowserAnimationsModule,
    MaterialModule,
    FlexLayoutModule,
    NgxEchartsModule.forRoot({
      echarts: () => import('echarts')
    }),
  ],
  declarations: [
    AppComponent,
    LoginComponent,
    SignupComponent,
    AddBoilerplateComponent,
    BoilerplateDetailsComponent,
    BoilerplateListComponent,
    AddPrefixComponent,
    PrefixDetailsComponent,
    PrefixListComponent,
    HeaderComponent,
    SidenavListComponent,
    MainListComponent,
    MainDetailsComponent,
    SuffixListComponent,
    SuffixDetailsComponent,
    GroupboilComponent,
    AddGroupboilComponent,
    InstancesListComponent,
    CourseDialogComponentComponent,
  ],
  providers: [
    AuthService,
    AuthGuard,
    {
      provide: HTTP_INTERCEPTORS,
      useClass: AuthInterceptor,
      multi: true,
    },
    {provide: APP_BASE_HREF, useValue: '/'},
  ],
  bootstrap: [AppComponent],
})
export class AppModule { }
