/**
 * 存放一些静态变量、Map 等全局可用的变量
 * @author 小鲤鱼听听
 */
/**
 * 未知文件类型图标
 */
export const unknownImg = new URL('@/assets/images/myResource/file/file_unknown.png', import.meta.url).href
/**
 * 文件类型图标 Map 映射
 */
export const fileImgMap = new Map([
	['avi', new URL('@/assets/images/myResource/file/file_avi.png', import.meta.url).href],
	['bat', new URL('@/assets/images/myResource/file/file_powershell.png', import.meta.url).href],
	['c', new URL('@/assets/images/myResource/file/file_c.png', import.meta.url).href],
	['c++', new URL('@/assets/images/myResource/file/file_c++.png', import.meta.url).href],
	['c#', new URL('@/assets/images/myResource/file/file_c#.png', import.meta.url).href],
	['css', new URL('@/assets/images/myResource/file/file_css.png', import.meta.url).href],
	['go', new URL('@/assets/images/myResource/file/file_go.png', import.meta.url).href],
	['py', new URL('@/assets/images/myResource/file/file_python.png', import.meta.url).href],
	['styl', new URL('@/assets/images/myResource/file/file_stylus.png', import.meta.url).href],
	['less', new URL('@/assets/images/myResource/file/file_less.png', import.meta.url).href],
	['conf', new URL('@/assets/images/myResource/file/file_nginx.png', import.meta.url).href],
	['m', new URL('@/assets/images/myResource/file/file_objective_c.png', import.meta.url).href],
	['scss', new URL('@/assets/images/myResource/file/file_scss.png', import.meta.url).href],
	['sass', new URL('@/assets/images/myResource/file/file_sass.png', import.meta.url).href],
	['csv', new URL('@/assets/images/myResource/file/file_csv.png', import.meta.url).href],
	['dmg', new URL('@/assets/images/myResource/file/file_dmg.png', import.meta.url).href],
	['dir', new URL('@/assets/images/myResource/file/dir.png', import.meta.url).href],
	['doc', new URL('@/assets/images/myResource/file/file_word.svg', import.meta.url).href],
	['docx', new URL('@/assets/images/myResource/file/file_word.svg', import.meta.url).href],
	['exe', new URL('@/assets/images/myResource/file/file_exe.png', import.meta.url).href],
	['html', new URL('@/assets/images/myResource/file/file_html.png', import.meta.url).href],
	['jar', new URL('@/assets/images/myResource/file/file_jar.png', import.meta.url).href],
	['java', new URL('@/assets/images/myResource/file/file_java.png', import.meta.url).href],
	['js', new URL('@/assets/images/myResource/file/file_js.png', import.meta.url).href],
	['json', new URL('@/assets/images/myResource/file/file_json.png', import.meta.url).href],
	['jsp', new URL('@/assets/images/myResource/file/file_jsp.png', import.meta.url).href],
	['kt', new URL('@/assets/images/myResource/file/file_kotlin.png', import.meta.url).href],
	['mp3', new URL('@/assets/images/myResource/file/file_music.png', import.meta.url).href],
	['flac', new URL('@/assets/images/myResource/file/file_flac.svg', import.meta.url).href],
	['oa', new URL('@/assets/images/myResource/file/file_oa.png', import.meta.url).href],
	['open', new URL('@/assets/images/myResource/file/file_open.png', import.meta.url).href],
	['pdf', new URL('@/assets/images/myResource/file/file_pdf.png', import.meta.url).href],
	['php', new URL('@/assets/images/myResource/file/file_php.png', import.meta.url).href],
	['ppt', new URL('@/assets/images/myResource/file/file_ppt.svg', import.meta.url).href],
	['pptx', new URL('@/assets/images/myResource/file/file_ppt.svg', import.meta.url).href],
	['properties', new URL('@/assets/images/myResource/file/file_properties.png', import.meta.url).href],
	['r', new URL('@/assets/images/myResource/file/file_r.png', import.meta.url).href],
	['rar', new URL('@/assets/images/myResource/file/file_rar.png', import.meta.url).href],
	['rs', new URL('@/assets/images/myResource/file/file_rust.png', import.meta.url).href],
	['rtf', new URL('@/assets/images/myResource/file/file_rtf.png', import.meta.url).href],
	['sh', new URL('@/assets/images/myResource/file/file_shell.png', import.meta.url).href],
	['sql', new URL('@/assets/images/myResource/file/file_sql.png', import.meta.url).href],
	['svg', new URL('@/assets/images/myResource/file/file_svg.png', import.meta.url).href],
	['swift', new URL('@/assets/images/myResource/file/file_swift.png', import.meta.url).href],
	['ts', new URL('@/assets/images/myResource/file/file_typescript.png', import.meta.url).href],
	['txt', new URL('@/assets/images/myResource/file/file_txt.png', import.meta.url).href],
	['vue', new URL('@/assets/images/myResource/file/file_vue.png', import.meta.url).href],
	['xls', new URL('@/assets/images/myResource/file/file_excel.svg', import.meta.url).href],
	['xlsx', new URL('@/assets/images/myResource/file/file_excel.svg', import.meta.url).href],
	['xml', new URL('@/assets/images/myResource/file/file_xml.png', import.meta.url).href],
	['zip', new URL('@/assets/images/myResource/file/file_zip.png', import.meta.url).href],
	['7z', new URL('@/assets/images/myResource/file/file_7z.svg', import.meta.url).href],
	['tar', new URL('@/assets/images/myResource/file/file_tar.svg', import.meta.url).href],
	['md', new URL('@/assets/images/myResource/file/file_markdown.png', import.meta.url).href],
	['markdown', new URL('@/assets/images/myResource/file/file_markdown.png', import.meta.url).href],
	['yaml', new URL('@/assets/images/myResource/file/file_yaml.png', import.meta.url).href],
	['yml', new URL('@/assets/images/myResource/file/file_yaml.png', import.meta.url).href]
])

/**
 * 支持使用 onlyoffice 打开的文件格式
 */
export const officeFileType = ['ppt', 'pptx', 'doc', 'docx', 'xls', 'xlsx']

/**
 * markdown 文件后缀
 */
export const markdownFileType = ['markdown', 'md']

/**
 * 文件展示模式选择列表时，所有可供选择的表格列名
 */
export const allColumnList = ['extendName', 'fileSize', 'uploadTime', 'deleteTime']

/**
 * 可以用代码编辑器打开的文件后缀和 解析语言、 codemirror 解析模式 mode 映射关系
 * language：解析语言,
 * mime: codemirror 解析模式
 */
export const fileSuffixCodeModeMap = new Map([
	['c', { language: 'C', mime: 'text/x-csrc' }],
	['c++', { language: 'C++', mime: 'text/x-c++src' }],
	['c#', { language: 'C#', mime: 'text/x-csharp' }],
	['m', { language: 'Objective-C', mime: 'text/x-objectivec' }],
	['go', { language: 'GO', mime: 'text/x-go' }],
	['kt', { language: 'Kotlin', mime: 'text/x-java' }],
	['css', { language: 'CSS', mime: 'text/css' }],
	['less', { language: 'Less', mime: 'text/x-less' }],
	['php', { language: 'PHP', mime: 'text/x-php' }],
	['bat', { language: 'PowerShell', mime: 'application/x-powershell' }],
	['py', { language: 'Python', mime: 'text/x-python' }],
	['properties', { language: 'Properties', mime: 'text/x-properties' }],
	['R', { language: 'R', mime: 'text/x-rsrc' }],
	['rs', { language: 'Rust', mime: 'text/x-rustsrc' }],
	['scss', { language: 'Scss', mime: 'text/x-scss' }],
	['sass', { language: 'Sass', mime: 'text/x-sass' }],
	['sh', { language: 'Shell', mime: 'text/x-sh' }],
	['styl', { language: 'stylus', mime: 'text/x-styl' }],
	['xml', { language: 'XML', mime: 'text/xml' }],
	['html', { language: 'HTML', mime: 'text/html' }],
	['http', { language: 'HTTP', mime: 'text/http' }],
	['conf', { language: 'Nginx', mime: 'text/x-nginx-conf' }],
	['java', { language: 'Java', mime: 'text/x-java' }],
	['js', { language: 'JavaScript', mime: 'text/javascript' }],
	['ts', { language: 'Typescript', mime: 'text/typescript' }],
	['json', { language: 'JSON', mime: 'application/json' }],
	['jsp', { language: 'JSP', mime: 'application/x-jsp' }],
	// ['txt', { language: '', mime: '' }],
	['vue', { language: 'HTML', mime: 'text/html' }],
	['sql', { language: 'SQL', mime: 'text/x-sql' }],
	['swift', { language: 'Swift', mime: 'text/x-swift' }],
	['yml', { language: 'YAML', mime: 'text/x-yaml' }]
])

/**
 * codemirror 编辑器代码高亮主题列表
 */
export const codeMirrorThemeList = [
	'3024-day',
	'3024-night',
	'abbott',
	'abcdef',
	'ambiance-mobile',
	'ambiance',
	'ayu-dark',
	'ayu-mirage',
	'base16-dark',
	'base16-light',
	'bespin',
	'blackboard',
	'cobalt',
	'colorforth',
	'darcula',
	'dracula',
	'duotone-dark',
	'duotone-light',
	'eclipse',
	'elegant',
	'erlang-dark',
	'gruvbox-dark',
	'hopscotch',
	'icecoder',
	'idea',
	'isotope',
	'juejin',
	'lesser-dark',
	'liquibyte',
	'lucario',
	'material-darker',
	'material-ocean',
	'material-palenight',
	'material',
	'mbo',
	'mdn-like',
	'midnight',
	'monokai',
	'moxer',
	'neat',
	'neo',
	'night',
	'nord',
	'oceanic-next',
	'panda-syntax',
	'paraiso-dark',
	'paraiso-light',
	'pastel-on-dark',
	'railscasts',
	'rubyblue',
	'seti',
	'shadowfox',
	'solarized',
	'ssms',
	'the-matrix',
	'tomorrow-night',
	'tomorrow-night-bright',
	'tomorrow-night-eighties',
	'ttcn',
	'twilight',
	'vibrant-ink',
	'xq-dark',
	'xq-light',
	'yeti',
	'yonce',
	'zenburn'
]

/**
 * codemirror 编辑器代码字体大小
 */
export const fontSizeList = [12, 14, 16, 18, 20, 22, 24, 26, 28, 30]
