import {NgModule} from '@angular/core';
import {CommonModule} from '@angular/common';

import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';

import {PiwikService} from '../openaireLibrary/utils/piwik/piwik.service';
import {TopicComponent} from "./topic.component";
import {TopicRoutingModule} from "./topic-routing.module";
import {RouterModule} from "@angular/router";
import {FormsModule, ReactiveFormsModule} from "@angular/forms";
import {IndicatorsComponent} from "./indicators.component";
import {AlertModalModule} from "../openaireLibrary/utils/modal/alertModal.module";
import {InputModule} from "../openaireLibrary/sharedComponents/input/input.module";
import {ClickModule} from "../openaireLibrary/utils/click/click.module";
import {AdminDashboardGuard} from "../utils/adminDashboard.guard";
import {IconsService} from "../openaireLibrary/utils/icons/icons.service";
import {
  preview,
  bullet,
  add,
  earth,
  lock,
  group,
  refresh,
  close,
  arrow_right, done
} from "../openaireLibrary/utils/icons/icons";
import {IconsModule} from "../openaireLibrary/utils/icons/icons.module";
import {PageContentModule} from "../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module";
import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module";

@NgModule({
  imports: [
    CommonModule, TopicRoutingModule, ClickModule, RouterModule, FormsModule, AlertModalModule,
    ReactiveFormsModule, InputModule, IconsModule, PageContentModule, LoadingModule
  ],
  declarations: [
    TopicComponent, IndicatorsComponent
  ],
  providers: [
    AdminDashboardGuard, PreviousRouteRecorder,
    PiwikService
  ],
  exports: [
    TopicComponent
  ]
})
export class TopicModule {
  constructor(private iconsService: IconsService) {
    this.iconsService.registerIcons([preview, bullet, add, earth, lock, group, refresh, close, arrow_right, done]);
  }
}
