import {forwardRef, NgModule} from "@angular/core";
import {NgbModule} from "@ng-bootstrap/ng-bootstrap";
import {CommonModule, registerLocaleData} from "@angular/common";
import localeRu from '@angular/common/locales/ru';
import {FormsModule} from "@angular/forms";
import {AgGridModule} from "ag-grid-angular";
import {
  BpmnModule,
  ComponentsModule,
  CoreModule,
  ProgressIndicationService,
  SecurityModule
} from "@webbpm/base-package";
import {AppHeaderComponent} from "./component/app-header.component";
import {AppFooterComponent} from "./component/app-footer.component";
import {AccessDeniedComponent} from "./component/access-denied.component";
import {ApplicationVersionComponent} from "./component/application-version.component";
import {RouterModule} from "@angular/router";
import {InternationalPhoneNumberModule} from "ngx-international-phone-number";
import {AppProgressIndicationComponent} from "./component/app-progress-indication.component";
import {AppProgressIndicationService} from "./service/app-progress-indication.service";
import {ErvuChartV2} from "../../ervu-dashboard/component/chart/ErvuChartV2";
import {FilterContainer} from "../../ervu-dashboard/component/filter/FilterContainer";

registerLocaleData(localeRu);
export const DIRECTIVES = [
  forwardRef(() => AppHeaderComponent),
  forwardRef(() => AppFooterComponent),
  forwardRef(() => ApplicationVersionComponent),
  forwardRef(() => AccessDeniedComponent),
  forwardRef(() => AppProgressIndicationComponent),
  forwardRef(() => ErvuChartV2),
  forwardRef(() => FilterContainer)
];

@NgModule({
            imports: [
              CommonModule,
              FormsModule,
              CoreModule,
              NgbModule,
              BpmnModule,
              SecurityModule,
              ComponentsModule,
              AgGridModule,
              RouterModule,
              InternationalPhoneNumberModule
            ],
            declarations: [
              DIRECTIVES
            ],
            exports: [
              DIRECTIVES
            ],
            providers: [
              { provide: ProgressIndicationService, useClass: AppProgressIndicationService }
            ],
            bootstrap: [],
            entryComponents: [AppProgressIndicationComponent]
          })
export class AppModule {
}
