import {NgModule} from '@angular/core';
import {RouterModule} from '@angular/router';

import {AuthCallbackComponent} from './components/auth-callback/auth-callback.component';
import {AuthCallbackGuard} from './components/auth-callback/auth-callback.guard';
import {NavBarGuard} from './services/nav-bar-guard.service';
import {FullScreenGuard} from './services/full-screen-guard.service';
import {SessionClearedComponent} from './components/session-cleared/session-cleared.component';
import {NotFoundComponent} from './components/not-found/not-found.component';
import { ProductionGuard } from './services/production-guard.service';


const routes = [
  {
    path: 'cb',
    component: AuthCallbackComponent
  },
  {
    path: 'loggedout',
    component: SessionClearedComponent,
    canActivate: [FullScreenGuard],
  },
  {
    path: '**', component: NotFoundComponent,
    canActivate: [NavBarGuard, ProductionGuard]
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule],
})
export class AppCommonRoutingModule {
}
