import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
import { registerLocaleData, HashLocationStrategy, LocationStrategy } from '@angular/common';
import zh from '@angular/common/locales/zh';
import { HttpInterceptorService } from './services/httpInterceptor.service';//请求拦截器
import { ShareModule } from './share/share.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { NZ_I18N, zh_CN, NzConfig, NZ_CONFIG } from 'ng-zorro-antd';
import { RouteReuseStrategy } from '@angular/router';
import { SimpleReuseStrategy } from './SimpleReuseStrategy';
import { MarkdownModule } from 'ngx-markdown';
// import { ColorSketchModule   } from 'ngx-color/sketch';
const ngZorroConfig: NzConfig = {
  // 注意组件名称没有 nz 前缀
  notification: { nzTop: 100 }
};
registerLocaleData(zh);
@NgModule({
  declarations: [
    AppComponent,
  ],
  imports: [
    BrowserModule,
    CommonModule,
    BrowserAnimationsModule,
    AppRoutingModule,
    HttpClientModule,
    ShareModule,
		MarkdownModule.forRoot(),
		// ColorSketchModule
  ],
  providers: [
    { provide: NZ_I18N, useValue: zh_CN },
    { provide: NZ_CONFIG, useValue: ngZorroConfig },
    { provide: LocationStrategy, useClass: HashLocationStrategy },
    { provide: HTTP_INTERCEPTORS, useClass: HttpInterceptorService, multi: true },
    { provide: RouteReuseStrategy, useClass: SimpleReuseStrategy },
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
