import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';
import {PreviousRouteRecorder} from '../openaireLibrary/utils/piwik/previousRouteRecorder.guard';
import {TopicComponent} from "./topic.component";
import {CanExitGuard} from "../openaireLibrary/utils/can-exit.guard";
import {AdminDashboardGuard} from "../utils/adminDashboard.guard";

@NgModule({
  imports: [
    RouterModule.forChild([
      {
        path: '',
        component: TopicComponent,
        canActivate: [AdminDashboardGuard],
        canDeactivate: [PreviousRouteRecorder, CanExitGuard]
      }
    ])
  ]
})
export class TopicRoutingModule {
}
