import { NgModule } from '@angular/core';
import { Routes, RouterModule, Route } from '@angular/router';
import { UserComponent } from './user/user.component';
import { ApplicationComponent } from './application/application.component';
import { ChecklistComponent } from './checklist/checklist.component';
import { DepartmentComponent } from './department/department.component';
import { MenuComponent } from './menu/menu.component';
import { RoleComponent } from './role/role.component';
import { ServerComponent } from './server/server.component';
import { StageComponent } from './stage/stage.component';
import { UseraddComponent } from './useradd/useradd.component';
import { WorkFlowComponent } from '../workflowconfiguration/workflow/workflow.component';
import { AuthGuard } from '../auth.guard';
import { MailfieldComponent } from './mailfield/mailfield.component';
import { UnitComponent } from './unit/unit.component';
import { MailtemplateComponent } from './mailtemplate/mailtemplate.component';
import { StagetypeComponent } from './stagetype/stagetype.component';
import { FilemodeComponent } from './filemode/filemode.component';
import { ProjectmasterComponent } from './projectmaster/projectmaster.component';
import { CustomerComponent } from './customer/customer.component';
import { CustomercontactComponent } from './customercontact/customercontact.component';
import { ChecklistdetailsComponent } from './checklistdetails/checklistdetails.component';
import { SkillComponent } from './skill/skill.component';
import { SubskillComponent } from './subskill/subskill.component';
import { VendorComponent } from './vendor/vendor.component';
import { AllocationtypeComponent } from './allocationtype/allocationtype.component';
import { FiletypeComponent } from './filetype/filetype.component';
import { FeatureComponent } from './feature/feature.component';
import { TrackComponent } from './track/track.component';
import { HeadinglevelComponent } from './headinglevel/headinglevel.component';
import { ToolsetComponent } from './toolset/toolset.component';
import { PluginComponent } from './plugin/plugin.component';
import { Miptopic1Component } from './miptopic1/miptopic1.component';
import { Miptopic2Component } from './miptopic2/miptopic2.component';
import { Miptopic3Component } from './miptopic3/miptopic3.component';
import { AppurlComponent } from './appurl/appurl.component';
import { JobMetaComponent } from './jobmeta/jobmeta.component';
import { PrintSupplementComponent } from './printsupplement/printsupplement.component';
import { UsermailfoldermappingComponent } from './usermailfoldermapping/usermailfoldermapping.component';
import { MailfolderpopupComponent } from './mailfolderpopup/mailfolderpopup.component';
import { AddusermailfoldermappingComponent } from './addusermailfoldermapping/addusermailfoldermapping.component';
import { StatecodeComponent } from './statecode/statecode.component';
import { FrequencyComponent } from './frequency/frequency.component';
import { CategorymasterComponent } from './categorymaster/categorymaster.component';
import { ErrormasterComponent } from './errormaster/errormaster.component';
import { ErrorremarksComponent } from './errorremarks/errorremarks.component';
import { LobmasterComponent } from './lobmaster/lobmaster.component';
import { LobdetailsComponent } from './lobdetails/lobdetails.component';
import { ChartvaluesComponent } from './chartvalues/chartvalues.component';
import { LotCommentComponent } from './lot-comment/lot-comment.component';

export const MasterRoutes: Route[] =  [
  { path: '', component: UserComponent, canActivate: [AuthGuard] },
  { path: 'user', component: UserComponent, canActivate: [AuthGuard] },
  { path: 'useradd', component: UseraddComponent, canActivate: [AuthGuard] },
  { path: 'application', component: ApplicationComponent, canActivate: [AuthGuard] },
  { path: 'checklist', component: ChecklistComponent , canActivate: [AuthGuard]},
  { path: 'department', component: DepartmentComponent, canActivate: [AuthGuard] },
  { path: 'mailfield', component: MailfieldComponent, canActivate: [AuthGuard] },
  { path: 'mailtemplate', component: MailtemplateComponent, canActivate: [AuthGuard] },
  { path: 'menu', component: MenuComponent, canActivate: [AuthGuard] },
  { path: 'role', component: RoleComponent, canActivate: [AuthGuard] },
  { path: 'unit', component: UnitComponent, canActivate: [AuthGuard] },
  { path: 'server', component: ServerComponent , canActivate: [AuthGuard]},
  { path: 'stagetype', component: StagetypeComponent, canActivate: [AuthGuard] },
  { path: 'filemode', component: FilemodeComponent, canActivate: [AuthGuard] },
  { path: 'projectmaster', component: ProjectmasterComponent },
  { path: 'customer', component: CustomerComponent },
  { path: 'customercontact', component: CustomercontactComponent },
  { path: 'checklistdetails', component: ChecklistdetailsComponent },
  { path: 'stage', component: StageComponent, canActivate: [AuthGuard] },
  { path: 'skill', component: SkillComponent, canActivate: [AuthGuard] },
  { path: 'subskill', component: SubskillComponent, canActivate: [AuthGuard] },
  { path: 'vendor', component: VendorComponent, canActivate: [AuthGuard] },
  { path: 'filetype', component: FiletypeComponent, canActivate: [AuthGuard] },
  { path: 'allocationtype', component: AllocationtypeComponent, canActivate: [AuthGuard] },
  { path: 'feature', component: FeatureComponent, canActivate: [AuthGuard] },
  { path: 'track', component: TrackComponent, canActivate: [AuthGuard] },
  { path: 'headinglevel', component: HeadinglevelComponent, canActivate: [AuthGuard] } ,
  { path: 'toolset', component: ToolsetComponent, canActivate: [AuthGuard] } ,
  { path: 'plugin', component: PluginComponent, canActivate: [AuthGuard] } ,
  { path: 'miptopic1', component: Miptopic1Component, canActivate: [AuthGuard] } ,
  { path: 'miptopic2', component: Miptopic2Component, canActivate: [AuthGuard] } ,
  { path: 'miptopic3', component: Miptopic3Component, canActivate: [AuthGuard] } ,
  { path: 'appurl', component: AppurlComponent, canActivate: [AuthGuard] } ,
  { path: 'jobmeta', component: JobMetaComponent, canActivate: [AuthGuard] } ,
  { path: 'printsupplement', component: PrintSupplementComponent, canActivate: [AuthGuard] } ,
  { path: 'usermailfoldermapping', component: UsermailfoldermappingComponent, canActivate: [AuthGuard]} ,
  { path: 'mailfolderpopup', component: MailfolderpopupComponent, canActivate: [AuthGuard]} ,
  { path: 'addusermailfoldermapping', component: AddusermailfoldermappingComponent, canActivate: [AuthGuard]} ,
  { path: 'statecode', component: StatecodeComponent, canActivate: [AuthGuard]} ,
  { path: 'frequency', component: FrequencyComponent, canActivate: [AuthGuard]} ,
  { path: 'category', component: CategorymasterComponent, canActivate: [AuthGuard]} ,
  { path: 'error', component: ErrormasterComponent, canActivate: [AuthGuard]} ,
  { path: 'errorremarks', component: ErrorremarksComponent, canActivate: [AuthGuard]} ,
  { path: 'lobmaster', component:LobmasterComponent, canActivate: [AuthGuard]},
  { path: 'lobdetails', component: LobdetailsComponent },
  { path: 'chartvalue', component: ChartvaluesComponent },
  {
  path: 'lot-comments/:projectdefinitionid',
  component: LotCommentComponent,canActivate: [AuthGuard]
},
];

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