import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { MyCenterHomeComponent } from './my-center-home/my-center-home.component';
import { AuthGuard } from '../auth/auth.guard';
import { MkMaterialComponent } from './mk-material/mk-material.component';
import { MkMaterialDetailComponent } from './mk-material-detail/mk-material-detail.component';
import { FileUploadComponent } from './file-upload/file-upload.component';
import { ImportantAnnouncementComponent } from './important-announcement/important-announcement.component';
import { SalesDetailComponent } from './sales-detail/sales-detail.component';
import { AnnouncementDetailComponent } from './announcement-detail/announcement-detail.component';
import { MyBusinessComponent } from './my-business/my-business.component';
import { MyBusinessDetailComponent } from './my-business-detail/my-business-detail.component';
import { SalesRankComponent } from './sales-rank/sales-rank.component';
import { TeamRankComponent } from './team-rank/team-rank.component';
import { RecruitingComponent } from './recruiting/recruiting.component';
import { RecruitingDetailComponent } from './recruiting-detail/recruiting-detail.component';
import { ThanksComponent } from './thanks/thanks.component';
import { MySettingComponent } from './my-setting/my-setting.component';
import { MySettingDetailComponent } from './my-setting-detail/my-setting-detail.component';
import { MyNewsComponent } from './my-news/my-news.component';
import { MyTargetComponent } from "./my-target/my-target.component";
import { TeamPanelComponent } from './team-panel/team-panel.component';
import { TeamSalesScoreComponent } from './team-sales-score/team-sales-score.component';
import { ScoreDetailsComponent } from './score-details/score-details.component';
import { BusinessCardComponent } from "./business-card/business-card.component";
import { OrderDetailComponent } from './order-detail/order-detail.component';
import { SalaryComponent } from './salary/salary.component';
import { TodoListComponent } from './todo-list/todo-list.component';
import { AddTaskComponent } from './add-task/add-task.component';
import { MedicalServiceComponent } from './medical-service/medical-service.component';
import { InvitationComponent } from './application-process/invitation/invitation.component';
import { RegisterComponent } from './application-process/register/register.component';
import { EmployeeInfoComponent } from './application-process/employee-info/employee-info.component';
import { EmployeeBasicInfoComponent } from './application-process/employee-basic-info/employee-basic-info.component';
import { WorkExperienceComponent } from './application-process/work-experience/work-experience.component';
import { PersonalPhotosComponent } from './application-process/personal-photos/personal-photos.component';
import { EmployeeIdCardComponent } from './application-process/employee-id-card/employee-id-card.component';
import { EmployeeEducationComponent } from './application-process/employee-education/employee-education.component';
import { PersonalStatementComponent } from './application-process/personal-statement/personal-statement.component';
import { SignatureComponent } from './application-process/signature/signature.component';
import { EmployeeSubmitComponent } from './application-process/employee-submit/employee-submit.component';
import { BankCardComponent } from './application-process/bank-card/bank-card.component';
import { MemberDetailComponent } from './member-detail/member-detail.component';
import { ApprovalListComponent } from './approval-list/approval-list.component';
import { ApprovalCommentsComponent } from './approval-comments/approval-comments.component';
import { ApprovalResultListComponent } from './approval-result-list/approval-result-list.component';
import { MyApplicationComponent } from './my-application/my-application.component';
import { SuggestionComponent } from './suggestion/suggestion.component';
import { EmployeeSalaryComponent } from './application-process/employee-salary/employee-salary.component';
import { HistoricalRankComponent } from './historical-rank/historical-rank.component';
import { TeamAreaPanelComponent } from './team-area-panel/team-area-panel.component';
import { ArticleComponent } from './article/article.component';
import { ActivityComponent } from './activity/activity.component';
import { ActivityDetailComponent } from './activity-detail/activity-detail.component';
import { AiofpComponent } from './aiofp/aiofp.component';

import { ArticleDetailComponent } from './article-detail/article-detail.component';
import { ArticleReadComponent } from './article-read/article-read.component';
import { SalaryDetailComponent } from './salary-detail/salary-detail.component';
import { SalaryFirstYearComponent } from './salary-first-year/salary-first-year.component';
import { ProductComponent } from './product/product.component';
import { ProductDataComponent } from "./product-data/product-data.component";
import { CommissionComponent } from './commission/commission.component';
import { FileListComponent } from './file-list/file-list.component';
import { MyCustomerComponent } from './my-customer/my-customer.component';
import { CustomerRelationComponent } from './customer-relation/customer-relation.component';
import { MyCustomerPolicyComponent } from './my-customer-policy/my-customer-policy.component';
import { UnderwritingKnowledgeComponent } from './underwriting-knowledge/underwriting-knowledge.component';
import { MyQuestionComponent } from './my-question/my-question.component';
import { AskComponent } from './ask/ask.component';
import { MenuItemComponent } from './menu-item/menu-item.component';
import { MemberListComponent } from './member-list/member-list.component';
import { ENoticeComponent } from './e-notice/e-notice.component';
import { RenewalReminderComponent } from './renewal-reminder/renewal-reminder.component';
import { RenewalReminderDetailComponent } from './renewal-reminder-detail/renewal-reminder-detail.component';
import { JointSalesComponent } from './joint-sales/joint-sales.component';
import { JointSaleDetailComponent } from './joint-sale-detail/joint-sale-detail.component';
import { IntegrationComponent } from './integration/integration.component';
import { IntegrationDetailComponent } from './integration-detail/integration-detail.component';
import { IntegrationRuleComponent } from './integration-rule/integration-rule.component';
import { VideoComponent } from '../common/video/video.component';
import { QrcodeUploadComponent } from './application-process/qrcode-upload/qrcode-upload.component';
import { NewsDetailComponent } from './news-detail/news-detail.component';
import { MoreFeaturesComponent } from './more-features/more-features.component';
import { MineComponent } from './mine/mine.component';
import { YdCollegeComponent } from './yd-college/yd-college.component';
import { MyTrainingComponent } from './my-training/my-training.component';
import { TrainingRecordsComponent } from './training-records/training-records.component';
import { CourseDetailComponent } from './course-detail/course-detail.component';
import { MyManagementComponent } from './my-management/my-management.component';

const myRoutes: Routes = [
  { path: '', component: MyCenterHomeComponent, canActivate: [AuthGuard], data: [{ title: '银盾保险经纪 - 工作台' }] },
  { path: 'material', component: MkMaterialComponent, canActivate: [AuthGuard],data:[{title:'产品海报'}]  },
  { path: 'material/:itemId', component: MkMaterialDetailComponent, canActivate: [AuthGuard],data:[{title:'产品海报'}]  },
  { path: 'fileUpload', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'fileUpload',title:'文件下载' }] },
  { path: 'trainingVideo', component: FileUploadComponent, canActivate: [AuthGuard], data: [{ type: 'trainingVideo' ,title:'视频培训'}] },
  { path: 'preJobTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type' ,title:'岗前训'}] },
  { path: 'newTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'新人训' }] },
  { path: 'promotionTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'提升训' }] },
  { path: 'cffpElementaryTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP初级训' }] },
  { path: 'cffpBridgingTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP衔接训' }] },
  { path: 'cffpAdvancedTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'CFFP高阶训' }] },
  { path: 'productTraining', component: TrainingRecordsComponent, canActivate: [AuthGuard], data: [{ type: 'yd_trainning_file_type',title:'产品培训' }] },
  { path: 'importantAnnouncement', component: ImportantAnnouncementComponent, canActivate: [AuthGuard] ,data:[{title:'重要公告'}]},
  { path: 'salesDetail', component: SalesDetailComponent, canActivate: [AuthGuard],data:[{title:'我的保单'}]  },
  { path: 'importantAnnouncement/:id', component: AnnouncementDetailComponent, canActivate: [AuthGuard] ,data:[{title:'重要公告'}] },
  { path: 'business', component: MyBusinessComponent, canActivate: [AuthGuard],data:[{type:'business',title:'我的商机'}] },
  { path: 'linkbusiness', component: MyBusinessComponent, canActivate: [AuthGuard],data:[{type:'linkbusiness',title:'我的商机'}] },
  { path: 'business/:id', component: MyBusinessDetailComponent, canActivate: [AuthGuard],data:[{title:'我的商机'}]  },
  { path: 'rank', component: SalesRankComponent, canActivate: [AuthGuard],data:[{title:'龙虎榜'}] },
  { path: 'teamRank', component: TeamRankComponent, canActivate: [AuthGuard],data:[{title:'团队排名'}] },
  { path: 'recruiting', component: RecruitingComponent, canActivate: [AuthGuard] ,data:[{type:'recruiting',title:'我的增员'}]},
  { path: 'linkrecruiting', component: RecruitingComponent, canActivate: [AuthGuard] ,data:[{type:'linkrecruiting',title:'增员管理'}]},
  { path: 'recruiting/:id', component: RecruitingDetailComponent, canActivate: [AuthGuard] ,data:[{title:'增员管理'}]},
  { path: 'thanks', component: ThanksComponent, canActivate: [AuthGuard] ,data:[{title:'感谢信'}]},
  { path: 'setting', component: MySettingComponent, canActivate: [AuthGuard],data:[{title:'设置'}] },
  { path: 'setting/:uploadType', component: MySettingDetailComponent, canActivate: [AuthGuard],data:[{title:'设置'}] },
  { path: 'news', component: MyNewsComponent, canActivate: [AuthGuard] ,data:[{title:'消息列表'}]},
  { path: 'target', component: MyTargetComponent, canActivate: [AuthGuard],data:[{title:'目标设置'}] },
  { path: 'teamPanel', component: TeamPanelComponent, canActivate: [AuthGuard],data:[{title:'我的团队'}] },
  { path: 'teamPanel/:type', component: TeamSalesScoreComponent, canActivate: [AuthGuard] ,data:[{title:'活动量得分'}]},
  { path: 'scoreDeatil', component: ScoreDetailsComponent, canActivate: [AuthGuard],data:[{title:'活动量统计'}] },
  { path: 'scoreDeatil/:practitionerId', component: ScoreDetailsComponent, canActivate: [AuthGuard],data:[{title:'团队战绩'}] },
  { path: 'businessCard', component: BusinessCardComponent, canActivate: [AuthGuard] ,data:[{title:'我的名片'}]},
  { path: 'orderDetail', component: OrderDetailComponent, canActivate: [AuthGuard] ,data:[{title:'订单详情'}]},
  { path: 'salary', component: SalaryComponent, canActivate: [AuthGuard],data:[{title:'我的薪资'}] },
  { path: 'todo', component: TodoListComponent, canActivate: [AuthGuard] ,data:[{title:'日程管理'}]},
  { path: 'addtask',component:AddTaskComponent,canActivate:[AuthGuard],data:[{title:'新建日程'}]},
  { path: 'medical_service',component:MedicalServiceComponent,canActivate:[AuthGuard],data:[{title:'营销活动'}]},
  { path: 'inviter' ,component:InvitationComponent,canActivate:[AuthGuard],data:[{type:'inviter',title: '邀请函'}]},
  { path: 'invitees' ,component:InvitationComponent,data:[{type:'invitees',title: '邀请函'}]},
  { path: 'register' ,component:RegisterComponent,data: [{ title: '注册信息' }]},
  { path: 'identify' ,component:RegisterComponent,data: [{ title: '客户告知书和保险经纪服务委托协议' }]},
  { path: 'employee_info',component:EmployeeInfoComponent,data: [{ title: '银盾经纪人报聘' }]},
  { path: 'employee_basic_info',component:EmployeeBasicInfoComponent,data: [{ title: '银盾经纪人报聘' }] },
  { path: 'work_experience',component:WorkExperienceComponent,data: [{ title: '银盾经纪人报聘' }] },
  { path: 'personal_photos',component:PersonalPhotosComponent,data: [{ title: '银盾经纪人报聘' }] },
  { path: 'employee_id_card',component:EmployeeIdCardComponent,data: [{ title: '银盾经纪人报聘' }] },
  { path: 'employee_education',component:EmployeeEducationComponent,data: [{ title: '银盾经纪人报聘' }] },
  { path: 'bank_card',component:BankCardComponent,data:[{title:'银盾经纪人报聘'}]},
  { path: 'employee_salary',component:EmployeeSalaryComponent,data: [{ title: '银盾经纪人报聘' }] },
  { path: 'qrcode_upload',component:QrcodeUploadComponent,data: [{ title: '银盾经纪人报聘' }] },
  { path: 'personal_statement',component:PersonalStatementComponent,data: [{ type:'personal_statement',title: '银盾经纪人报聘' }] },
  { path: 'contract',component:PersonalStatementComponent,data: [{ type:'contract',title: '银盾经纪人报聘' }] },
  { path: 'signature',component:SignatureComponent,data: [{ title: '银盾经纪人报聘' }]},
  { path: 'eNoticeSignature',component:SignatureComponent,data: [{ title: '客户告知书和保险经纪服务委托协议' }]},
  { path: 'employee_submit',component:EmployeeSubmitComponent,data: [{ title: '已提交' }]},
  { path: 'eNotice_submit',component:EmployeeSubmitComponent,data: [{ title: '已提交' }]},
  { path: 'member_detail/:practitionerId',component:MemberDetailComponent, canActivate: [AuthGuard],data:[{title:'团队成员'}]},
  { path: 'approval_list',component:ApprovalListComponent, data: [{ title: '审批列表' }],canActivate: [AuthGuard]},
  { path: 'approval_comments',component:ApprovalCommentsComponent,canActivate:[AuthGuard],data:[{title:'审批意见'}]},
  { path: 'approval_result_list',component:ApprovalResultListComponent,data: [{ title: '审批流程' }],canActivate:[AuthGuard]},
  { path: 'my_application',component:MyApplicationComponent,data: [{ title: '我的报聘' }],canActivate:[AuthGuard]},
  { path: 'suggestion',component:SuggestionComponent,data: [{ title: '问题反馈' }],canActivate:[AuthGuard]},
  { path: 'historical_rank', component: HistoricalRankComponent, canActivate: [AuthGuard] ,data:[{title:'往期历史'}]},
  { path: 'team_area',component:TeamAreaPanelComponent, canActivate: [AuthGuard],data:[{title:'我的团队'}]},
  { path: 'article/:mdDropOptionId', component:ArticleComponent,data:[{title:'文章分享'}]},  
  { path: 'articleDetail/:id',component:ArticleDetailComponent,data:[{title:'文章分享'}]},
  { path: 'activity/:mdDropOptionId', component:ActivityComponent,data:[{title:'活动分享'}]},
  { path: 'activityDetail/:id',component:ActivityDetailComponent,data:[{title:'加入银盾创投计划'}]},
  { path: 'aiofp',component:AiofpComponent,data:[{title:'AIOFO'}]},
  { path: 'article_read/:id',component:ArticleReadComponent,canActivate:[AuthGuard],data:[{title:'文章分享'}]},
  { path: 'salary_detail',component:SalaryDetailComponent,canActivate:[AuthGuard],data:[{title:'薪资详情'}]},
  { path: 'salary_detail/:id',component:SalaryFirstYearComponent,canActivate:[AuthGuard],data:[{title:'薪资详情'}]},
  { path: 'product',component:ProductComponent,canActivate:[AuthGuard],data:[{title:'产品库'}]},
  { path: 'productData/:id',component:ProductDataComponent,canActivate:[AuthGuard],data:[{title:'产品资料'}]},
  { path: 'commission',component:CommissionComponent,canActivate:[AuthGuard],data:[{title:'公告佣率'}]},
  { path: 'filelist',component:FileListComponent,canActivate:[AuthGuard],data:[{title:'文件列表'}]},
  { path: 'customer',component:MyCustomerComponent,canActivate:[AuthGuard],data:[{title:'我的客户'}]},
  { path: 'customer_relation',component:CustomerRelationComponent,canActivate:[AuthGuard],data:[{title:'客户关系'}]},
  { path: 'customer_policy',component:MyCustomerPolicyComponent,canActivate:[AuthGuard],data:[{title:'保单'}]},
  { path: 'underwriting_knowledge',component:UnderwritingKnowledgeComponent,canActivate:[AuthGuard],data:[{title:'投核保问题'}]},
  { path: 'my_question',component:MyQuestionComponent,canActivate:[AuthGuard],data:[{title:'我的问题'}]},
  { path: 'ask',component:AskComponent,canActivate:[AuthGuard],data:[{title:'我要提问'}]},
  { path: 'marketing',component:MenuItemComponent,data:[{title:'银盾保经-营销工具',type:'marketing'}],canActivate:[AuthGuard]},
  { path: 'team',component:MenuItemComponent,data:[{title:'银盾保经-我的团队',type:'team'}],canActivate:[AuthGuard]},
  { path: 'exhibition',component:MenuItemComponent,data:[{title:'银盾保经-我的展业',type:'exhibition'}],canActivate:[AuthGuard]},
  { path: 'trainingCenter',component:MenuItemComponent,data:[{title:'银盾保经-教育培训',type:'trainingCenter'}],canActivate:[AuthGuard]},
  { path: 'newPeople',component:MenuItemComponent,data:[{title:'银盾保经-新人入口',type:'newPeople'}],canActivate:[AuthGuard]},
  { path: 'member_list/:systemType',component:MemberListComponent,canActivate:[AuthGuard],data:[{title:'团队成员'}]},
  { path: 'continuation_rate_commitment',component:ENoticeComponent,canActivate:[AuthGuard],data:[{type:2,title:'继续率承诺书'}]},
  { path: 'eNoticeSign',component:ENoticeComponent,data:[{type:1,title: '客户告知书和保险经纪服务委托协议'}]},
  { path: 'renewal_reminder',component:RenewalReminderComponent,canActivate:[AuthGuard],data:[{type:1,title: '续期提醒'}]},
  { path: 'renewal_reminder_detail/:orderPayId',component:RenewalReminderDetailComponent,canActivate:[AuthGuard],data:[{type:1,title: '续期订单提醒'}]},
  { path: 'reminder_detail/:orderPayId',component:RenewalReminderDetailComponent,data:[{type:2,title: '续期订单详情信息'}]},
  { path: 'joint_sales',component:JointSalesComponent,canActivate:[AuthGuard],data:[{title: '联合销售列表'}]},
  { path: 'joint_sales_detail/:unionSalesId',component:JointSaleDetailComponent,canActivate:[AuthGuard],data:[{title: '联合销售签署'}]},
  { path: 'integration',component:IntegrationComponent,canActivate:[AuthGuard],data:[{title: '我的积分'}]},
  { path: 'integration_detail',component:IntegrationDetailComponent,canActivate:[AuthGuard],data:[{title: '积分明细'}]},
  { path: 'integration_rule',component:IntegrationRuleComponent,canActivate:[AuthGuard],data:[{title: '积分规则'}]},
  { path: 'video/:fileId/:fileCategory',component:VideoComponent,canActivate:[AuthGuard],data:[{title: '视频播放'}]},
  { path: 'pdfView/:fileId/:fileCategory',component:VideoComponent,canActivate:[AuthGuard],data:[{title: 'PDF查看'}]},
  { path: 'newsDetail/:id',component:NewsDetailComponent,canActivate:[AuthGuard],data:[{title: '消息详情'}]},
  { path: 'moreFeatures',component:MoreFeaturesComponent,canActivate:[AuthGuard],data:[{title: '全部工具'}]},
  { path: 'mine',component:MineComponent,canActivate:[AuthGuard],data:[{title: '我的'}]},
  { path: 'ydCollege',component:YdCollegeComponent,canActivate:[AuthGuard],data:[{title: '银盾学院'}]},
  { path: 'myTraining',component:MyTrainingComponent,canActivate:[AuthGuard],data:[{title: '我的培训'}]},
  { path: 'trainingRecords/:status',component:TrainingRecordsComponent,canActivate:[AuthGuard],data:[{title: '培训课程'}]},
  { path: 'courseDetail/:status/:fileId',component:CourseDetailComponent,canActivate:[AuthGuard],data:[{title: '课程介绍'}]},
  { path: 'trainingManagement',component:MyManagementComponent,canActivate:[AuthGuard],data:[{title:'我的管理'}]}

];

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