import type { AppRouteRecordRaw, AppRouteModule } from '@/router/types';
import { HomeOutlined } from '@ant-design/icons-vue';
import { routerList } from './routerList';

// 权限管理
const PermissionRoute : AppRouteRecordRaw = {
	path: '/permission',
	name: 'permission',
	component: routerList.Permission,
	meta: {
		title: '权限管理',
		icon: HomeOutlined
	},
	children: [
		{
			path: '/role',
			name: 'role',
			component: routerList.ROLE,
			meta: {
				title: '角色管理',
				icon: HomeOutlined
			}
		},
		{
			path: '/account',
			name: 'account',
			component: routerList.Account,
			meta: {
				title: '账号管理',
				icon: HomeOutlined
			}
		},
		{
			path: '/permission/list',
			name: 'list',
			component: routerList.List,
			meta: {
				title: '权限管理',
				icon: HomeOutlined
			}
		}
	]
};


// 企业相关
const CompanyRoute : AppRouteRecordRaw = {
	path: '/company',
	name: 'company',
	component: routerList.Company,
	meta: {
		title: '企业管理',
		icon: HomeOutlined
	},
	children: [{
			path: '/member',
			name: 'member',
			component: routerList.Member,
			meta: {
				title: '企业列表',
				icon: HomeOutlined
			},
		},
		{
			path: '/vip',
			name: 'vip',
			component: routerList.Vip,
			meta: {
				title: 'VIP管理',
				icon: HomeOutlined
			},
		},
		{
			path: '/department',
			name: 'department',
			component: routerList.Department,
			meta: {
				title: '部门管理',
				icon: HomeOutlined
			},
		},
		{
			path: '/job',
			name: 'job',
			component: routerList.Job,
			meta: {
				title: '职位管理',
				icon: HomeOutlined
			},
		},
		
	]
};

// 家政
// const HomemakeRoute : AppRouteRecordRaw = {
// 	path: '/homemake',
// 	name: 'homemake',
// 	component: routerList.Homemake,
// 	meta: {
// 		title: '家政管理',
// 		icon: HomeOutlined
// 	},
// 	children: [{
// 			path: '/homemake/type',
// 			name: 'homemakeType',
// 			component: routerList.HomemakeType,
// 			meta: {
// 				title: '家政类型',
// 				icon: HomeOutlined
// 			},
// 		},
// 		{
// 			path: '/homemake/position',
// 			name: 'homemakePosition',
// 			component: routerList.HomemakePosition,
// 			meta: {
// 				title: '职位申请',
// 				icon: HomeOutlined
// 			},
// 		},
// 		{
// 			path: '/homemake/demand',
// 			name: 'homemakeDemand',
// 			component: routerList.HomemakeDemand,
// 			meta: {
// 				title: '家政需求',
// 				icon: HomeOutlined
// 			},
// 		},
// 		{
// 			path: '/homemake/appointment',
// 			name: 'homemakeAppointment',
// 			component: routerList.HomemakeAppointment,
// 			meta: {
// 				title: '家政预定',
// 				icon: HomeOutlined
// 			},
// 		},
// 	]
// };

// 求职者管理
const JokSeekerRoute : AppRouteRecordRaw = {
	path: '/job/seeker',
	name: 'jobSeeker',
	component: routerList.JobSeeker,
	meta: {
		title: '求职者管理',
		icon: HomeOutlined
	},
	children: [
		{
			path: '/resume',
			name: 'jobResume',
			component: routerList.JobResume,
			meta: {
				title: '简历列表',
				icon: HomeOutlined
			},
		},
	]
};

// 招聘会管理
const JokFairRoute : AppRouteRecordRaw = {
	path: '/job/fair',
	name: 'jobFair',
	component: routerList.JokFair,
	meta: {
		title: '招聘会管理',
		icon: HomeOutlined
	},
	children: [
		{
			path: '/job/fair/list',
			name: 'jobFairList',
			component: routerList.JobFairList,
			meta: {
				title: '招聘会列表',
				icon: HomeOutlined
			},
		},
		// {
		// 	path: '/job/fair/company',
		// 	name: 'jobFairCompany',
		// 	component: routerList.JobFairCompany,
		// 	meta: {
		// 		title: '参与企业',
		// 		icon: HomeOutlined
		// 	},
		// },
	]
};

// 资讯管理
const InformationRoute : AppRouteRecordRaw = {
	path: '/information',
	name: 'information',
	component: routerList.Information,
	meta: {
		title: '资讯管理',
		icon: HomeOutlined
	},
	children: [
		{
			path: '/section',
			name: 'section',
			component: routerList.InformationSection,
			meta: {
				title: '栏目/频道',
				icon: HomeOutlined
			},
		},
		{
			path: '/article',
			name: 'article',
			component: routerList.InformationArticle,
			meta: {
				title: '文章列表',
				icon: HomeOutlined
			},
		}
	],
	
};

// 广告管理
const AdvertisementRoute : AppRouteRecordRaw = {
	path: '/advertisement',
	name: 'advertisement',
	component: routerList.Advertisement,
	meta: {
		title: '广告/活动管理',
		icon: HomeOutlined
	},
	children: [
		{
			path: '/advertisement/list',
			name: 'advertisementList',
			component: routerList.AdvertisementList,
			meta: {
				title: '广告/活动列表',
				icon: HomeOutlined
			},
		},
		{
			path: '/put/in',
			name: 'putIn',
			component: routerList.AdvertisementPutin,
			meta: {
				title: '广告/活动投放',
				icon: HomeOutlined
			},
		}
	],
	
};

// 活动管理
const ActivityRoute : AppRouteRecordRaw = {
	path: '/activity',
	name: 'activity',
	component: routerList.Activity,
	meta: {
		title: '活动管理',
		icon: HomeOutlined
	},
	children: [
		// {
		// 	path: '/activity/list',
		// 	name: 'activityList',
		// 	component: routerList.ActivityList,
		// 	meta: {
		// 		title: '活动列表',
		// 		icon: HomeOutlined
		// 	},
		// },
		{
			path: '/activity/address',
			name: 'activityAddress',
			component: routerList.ActivityAddress,
			meta: {
				title: '活动地址',
				icon: HomeOutlined
			},
		}
	],
	
};

// 统计
const StatisticsRoute : AppRouteRecordRaw = {
	path: '/statistics',
	name: 'statistics',
	component: routerList.Statistics,
	meta: {
		title: '统计管理',
		icon: HomeOutlined
	},
	children: [
		{
			path: '/statistics/resume',
			name: 'statisticsResume',
			component: routerList.StatisticsResume,
			meta: {
				title: '简历统计',
				icon: HomeOutlined
			},
			children: [
				{
					path: '/statistics/resume/major',
					name: 'statisticsResumeMajor',
					component: routerList.StatisticsResumeMajor,
					meta: {
						title: '专业',
						icon: HomeOutlined
					},
				}, 
				{  
					path: '/statistics/resume/age/sex',
					name: 'statisticsResumeAgeSex',
					component: routerList.StatisticsResumeAgeSex,
					meta: {
						title: '年龄与性别',
						icon: HomeOutlined
					},
				},
				{
					path: '/statistics/resume/certificate/skill',
					name: 'statisticsResumeCertificateSkill',
					component: routerList.StatisticsResumeCertificateSkill,
					meta: {
						title: '技能证书',
						icon: HomeOutlined
					},
				},
				{
					path: '/statistics/resume/education',
					name: 'statisticsResumeEducation',
					component: routerList.StatisticsResumeEducation,
					meta: {
						title: '学历',
						icon: HomeOutlined
					},
				},
				{
					path: '/statistics/resume/holidays/accommodation',
					name: 'statisticsResumeHolidaysAccommodation',
					component: routerList.StatisticsResumeHolidaysAccommodation,
					meta: {
						title: '节假日与食宿',
						icon: HomeOutlined
					},
				},
				{   
					path: '/statistics/resume/job/intention',
					name: 'statisticsResumeJobIntention',
					component: routerList.StatisticsResumeJobIntention,
					meta: {
						title: '求职意向',
						icon: HomeOutlined
					},
				},
				{
					path: '/statistics/resume/title/skill',
					name: 'statisticsResumeTitleSkill',
					component: routerList.StatisticsResumeTitleSkill,
					meta: {
						title: '职称与技能',
						icon: HomeOutlined
					},
				},
				{
					path: '/statistics/resume/work/experience',
					name: 'statisticsResumeWorkExperience',
					component: routerList.StatisticsResumeWorkExperience,
					meta: {
						title: '工作经验',
						icon: HomeOutlined
					},
				},
				
			],
		},
		{
			path: '/statistics/company',
			name: 'statisticsCompany',
			component: routerList.StatisticsCompany,
			meta: {
				title: '企业统计',
				icon: HomeOutlined
			},
			children: [
				{
					path: '/statistics/company/job',
					name: 'statisticsCompanyJob',
					component: routerList.StatisticsCompanyJob,
					meta: {
						title: '职位',
						icon: HomeOutlined
					},
				}, 
			]
		}
	],
	
};


// 设置
// 活动管理
const SettingRoute : AppRouteRecordRaw = {
	path: '/setting',
	name: 'setting',
	component: routerList.Setting,
	meta: {
		title: '系统设置',
		icon: HomeOutlined
	},
	children: [
		// {
		// 	path: '/activity/list',
		// 	name: 'activityList',
		// 	component: routerList.ActivityList,
		// 	meta: {
		// 		title: '活动列表',
		// 		icon: HomeOutlined
		// 	},
		// },
		{
			path: '/setting/item',
			name: 'settingItem',
			component: routerList.SettingItem,
			meta: {
				title: '配置项',
				icon: HomeOutlined
			},
		}
	],
	
};

// 其他管理
const OtherRoute : AppRouteRecordRaw = {
	path: '/other',
	name: 'other',
	component: routerList.Other,
	meta: {
		title: '其他设置',
		icon: HomeOutlined
	},
	children: [
		// {
		// 	path: '/activity/list',
		// 	name: 'activityList',
		// 	component: routerList.ActivityList,
		// 	meta: {
		// 		title: '活动列表',
		// 		icon: HomeOutlined
		// 	},
		// },
		{
			path: '/other/tokenizer',
			name: 'otherTokenizer',
			component: routerList.Tokenizer,
			meta: {
				title: '分词器',
				icon: HomeOutlined
			},
		}
	],
	
};

// 其他管理
const FeedbackRoute : AppRouteRecordRaw = {
	path: '/feedback',
	name: 'feedback',
	component: routerList.Feedback,
	meta: {
		title: '反馈管理',
		icon: HomeOutlined
	},
	children: [
		// {
		// 	path: '/activity/list',
		// 	name: 'activityList',
		// 	component: routerList.ActivityList,
		// 	meta: {
		// 		title: '活动列表',
		// 		icon: HomeOutlined
		// 	},
		// },
		{
			path: '/feedback/list',
			name: 'feedbackList',
			component: routerList.FeedbackList,
			meta: {
				title: '反馈列表',
				icon: HomeOutlined
			},
		}
	],
};

// 求职企业账号管理
// const CustomerRoute : AppRouteRecordRaw = {
// 	path: '/customer',
// 	name: 'customer',
// 	component: routerList.Customer,
// 	meta: {
// 		title: '求职企业账号管理',
// 		icon: HomeOutlined
// 	},
// 	children: [
// 		// {
// 		// 	path: '/activity/list',
// 		// 	name: 'activityList',
// 		// 	component: routerList.ActivityList,
// 		// 	meta: {
// 		// 		title: '活动列表',
// 		// 		icon: HomeOutlined
// 		// 	},
// 		// },
// 		{
// 			path: '/customer/list',
// 			name: 'customerList',
// 			component: routerList.CustomerList,
// 			meta: {
// 				title: '账号列表',
// 				icon: HomeOutlined
// 			},
// 		}
// 	],
// };


export const routesModuleList : AppRouteModule[] = [CompanyRoute, JokSeekerRoute, JokFairRoute, InformationRoute, AdvertisementRoute, ActivityRoute, StatisticsRoute,PermissionRoute, SettingRoute, OtherRoute, FeedbackRoute];