import i18n from '../locale/index.js'
import Vue from 'vue'
import VueI18n from 'vue-i18n'

var PRIVATE_SPACE = 1024 * 1024 * 1024 * 1 //教师Blob个人空间
var SCHOOL_SPACE = 1024 * 1024 * 1024 * 10 //学校Blob空间
const DEFAULT_SCHOOL_CODE = 'SYSTEM_NO_SCHOOL' //尚未归属学校的默认学校编码
const NotSupport = ['SH','EXE','BAT']
//文件类型，对应内容模块Blob目录
const CONTENT_TYPES = {
	'image': ['JPG', 'JPEG', 'BMP', 'TIF', 'PNG', 'GIF', 'SVG'],
	'video': ['RMVB','WMV','ASF','AVI','3GP','MPG','MKV','MP4','DVD','OGM','MOV','MPEG2','MPEG4'],
	'doc': ['PPT', 'PPTX', 'DOC', 'DOCX', 'PDF', 'XLS', 'XLSX', 'CSV'],
	'res': ['HTE', 'HTEX'],
	'audio': ['MP3','OGG','WAV','APE','CDA','AU','MIDI','MAC','AAC']
}

//系统默认考试类型
const EXAM_TYPE = () => {
	return [{
		id: "100",
		name: i18n.t('global.examType1')
	},
	{
		id: "101",
		name: i18n.t('global.examType2')
	},
	{
		id: "200",
		name: i18n.t('global.examType3')
	}
	]
}
//系统固定评测类型
const EV_TYPE = () => {
	return [{
		value: 'regular',
		label: i18n.t('global.evType1')
	},
	{
		value: 'simulation',
		label: i18n.t('global.evType2')
	},
	{
		value: 'normal',
		label: i18n.t('global.evType3')
	}
	]
}
//系统固定评测类型
const EV_MODE = () => {
	return [{
		value: '0',
		label: i18n.t('global.evMode1')
	},
	{
		value: '1',
		label: i18n.t('global.evMode2')
	},
	{
		value: '2',
		label: i18n.t('global.evMode3')
	}
	]
}
//系统固定评测发布方式
const PUBLISH_TYPE = () => {
	return [{
		value: '0',
		label: i18n.t('global.publishType1')
	},
	{
		value: '1',
		label: i18n.t('global.publishType2')
	}
	]
}

/* 题目题型定义 */
const EXERCISE_TYPES = () => {
	return {
		single: i18n.t('evaluation.single'),
		multiple: i18n.t('evaluation.multiple'),
		judge: i18n.t('evaluation.judge'),
		complete: i18n.t('evaluation.complete'),
		subjective: i18n.t('evaluation.subjective'),
		connector: i18n.t('evaluation.connector'),
		correct: i18n.t('evaluation.correct'),
		compose: i18n.t('evaluation.compose')
	}
}

/* 题目难度定义 */
const EXERCISE_DIFFS = () => {
	return [
		i18n.t('evaluation.diff1'),
		i18n.t('evaluation.diff2'),
		i18n.t('evaluation.diff3'),
		i18n.t('evaluation.diff4'),
		i18n.t('evaluation.diff5')
	]
}

/* 题目认知层次定义 */
const EXERCISE_LEVELS = () => {
	return [
		i18n.t('evaluation.level1'),
		i18n.t('evaluation.level2'),
		i18n.t('evaluation.level3'),
		i18n.t('evaluation.level4'),
		i18n.t('evaluation.level5'),
		i18n.t('evaluation.level6')
	]
}

/* 维度定义 */
const DIMENSIONS = () => {
	return [{
		"code": "2438e72f-4de8-4ccb-8cae-3f1dce89a769",
		"val": "学情分析"
	},
	{
		"code": "44e25d11-101f-49bf-b60a-e41c833f0fa1",
		"val": "教学设计"
	},
	{
		"code": "7371e4fb-a470-49dd-8bf1-8c74516a8630",
		"val": "学法指导"
	},
	{
		"code": "430b9157-b771-4322-a5f1-e1737df9461f",
		"val": "学业评价"
	}
	]
}

/* 维度定义 */
const VIDEO_DIMENSIONS = () => {
	return [{
		"code": "24D43BAE-71A4-BC19-882E-D995260517FE",
		"val": "教学设计"
	},
	{
		"code": "49221BDE-561A-9CBB-236B-0DDA58D25D95",
		"val": "教学过程"
	},
	{
		"code": "2A144531-EC47-5405-0BC2-DE39C6C592E8",
		"val": "融合创新"
	},
	{
		"code": "BD6B7AC6-F492-32BC-A9C983636E744A97",
		"val": "技术应用"
	},
	{
		"code": "0B3D04A1-4C23-225F-B839-FE2D8FAC3921",
		"val": "教学效果"
	}
	]
}

const TRAIN_TYPE = () => {
	return [
		{
			label: '信息化教学案例展示与分享',
			value: 1
		},
		{
			label: '专家专题培训',
			value: 2
		},
		{
			label: '同课同构',
			value: 3
		},
		{
			label: '同课异构',
			value: 4
		},
		{
			label: '校本2.0培训',
			value: 5
		},
		{
			label: '自定义活动',
			value: 6
		}
	]
}

const GLOBAL = {
	CONTENT_TYPES,
	PRIVATE_SPACE,
	SCHOOL_SPACE,
	DEFAULT_SCHOOL_CODE,
	EXAM_TYPE,
	EXERCISE_TYPES,
	EXERCISE_DIFFS,
	EXERCISE_LEVELS,
	EV_TYPE,
	EV_MODE,
	PUBLISH_TYPE,
	DIMENSIONS,
	VIDEO_DIMENSIONS,
	TRAIN_TYPE
}

const install = (Vue, options) => {
	Vue.use(VueI18n)
	Vue.prototype.$GLOBAL = GLOBAL
}

export default {
	install

}
export {
	GLOBAL
}
