import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
import { TokenIntercepterInterceptor } from './intercepter/token-intercepter.interceptor';
import { AuthGuard } from './guards/auth.guard';


@NgModule({
    declarations: [],
    imports: [
        CommonModule,
        HttpClientModule,
    ],
    exports: [
        CommonModule,
        HttpClientModule,
    ],
    providers: [
        AuthGuard,
        { provide: HTTP_INTERCEPTORS, useClass: TokenIntercepterInterceptor, multi: true },
    ]
})
export class CoreModule { }
