import {NgModule} from "@angular/core";
import {RouterModule, Routes} from "@angular/router";
import {
  ConfirmExitGuard
} from "@webbpm/base-package";
import {TokenFormComponent} from "./component/token-form.component";
import {RolesGuard} from "../app/guard/RolesGuard";

const webbpmRoutes: Routes = [
  {
    path: 'token-form',
    component: TokenFormComponent
  },
  {
    path: '',
    loadChildren: 'generated-sources/page-conversion.module#PageconversionModule',
    canActivate: [ConfirmExitGuard, RolesGuard],
    pathMatch: 'full',
  },
  {
    path: '**',
    redirectTo: '',
  }
];

@NgModule({
  imports: [RouterModule.forRoot(webbpmRoutes, {
    useHash: true,
    onSameUrlNavigation: "reload"
  })],
  exports: [RouterModule]
})
export class WebbpmRoutingModule {

}
