import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { WorkareaComponent } from './workarea/workarea.component';
import { CompletionPopupComponent } from './completionPopup/completionPopup.component';
import { DashboardComponent } from './dashboard.component';
import { JobassignmentComponent } from './jobassignment/jobassignment.component';
import { AuthGuard } from '../auth.guard';
import { AuthordashboardComponent } from './authordashboard/authordashboard.component';
import { RecorderrorinfoComponent } from './recorderrorinfo/recorderrorinfo.component';

const routes: Routes = [
  { path: '', component: DashboardComponent, pathMatch: 'full', canActivate: [AuthGuard] },
  { path: 'workarea', component: WorkareaComponent, canActivate: [AuthGuard]},
  { path: 'completionPopup', component: CompletionPopupComponent, canActivate: [AuthGuard]},
  { path: 'jobassignment', component: JobassignmentComponent, canActivate: [AuthGuard]},
  { path: 'board/:projectId', component: DashboardComponent, pathMatch: 'full', canActivate: [AuthGuard] },
  { path: 'authordashboard', component: AuthordashboardComponent, pathMatch: 'full', canActivate: [AuthGuard] },
  { path: 'recorderrorinfo', component: RecorderrorinfoComponent, pathMatch: 'full', canActivate: [AuthGuard] }
];

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