import { NgModule, APP_INITIALIZER } from '@angular/core';
import { HTTP_INTERCEPTORS } from '@angular/common/http';

import { CookieService } from 'ngx-cookie-service';

import { BasicAuthHtppInterceptorService } from './interceptor/basic-auth.http-interceptor';
import { API_BASE_URL } from 'src/modules/common/type/injection-token.type';

@NgModule({
  imports: [],
  exports: [],
  providers: [
    CookieService,
    {
      provide: HTTP_INTERCEPTORS,
      useClass: BasicAuthHtppInterceptorService,
      multi: true
    },
    {
      provide: API_BASE_URL,
      useValue: 'http://localhost:8088/api',
      multi: true
    }
  ]
})
export class AppProviderModule {}
