import {ModuleWithProviders, NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';
import {AuthorizationRoutingModule} from "./authorization-routing.module";
import {AuthorizeComponent} from './authorize/authorize.component';
import {ReactiveFormsModule} from '@angular/forms';
import {SharedModule} from "../shared/shared.module";
import {AuthGuard} from "./guards/auth.guard";

@NgModule({
    declarations: [
        AuthorizeComponent
    ],
    imports: [
        AuthorizationRoutingModule,
        CommonModule,
        SharedModule,
        ReactiveFormsModule,
    ]
})
export class AuthorizationModule {
    static forRoot(): ModuleWithProviders<AuthorizationModule> {
        return {
            ngModule: AuthorizationModule,
            providers: [
                AuthGuard,
            ]
        };
    }
}
