export type AnimationNameValueType = 'none' | 'slide-fade-in-up' | 'slide-fade-in-right' | 'zoom-fade-in' | 'fade-in'

export interface Layout {
	showDrawer: boolean
	headerTheme: 'light' | 'dark'
	navTheme: 'light' | 'dark' | 'real-dark'
	layout: 'side' | 'top' | 'mix'
	contentWidth: 'Fixed' | 'Fluid'
	splitMenus: boolean
	collapsed: boolean
	fixSiderbar: boolean
	fixedHeader: boolean
	collapsedWidth: number
	sideBarWidth: number
	disableContentMargin: boolean
	headerHeight: number
	waterMark: string
	menu?: boolean
	multiTab: boolean
	multiTabFixed: boolean
	colorWeak: boolean
	gray: boolean
	animationName: AnimationNameValueType
}

export interface Theme {
	menuColor: string // primary color of ant design
	primaryColor: string
	colorWeak: boolean
}

export interface GlobalConfig {
	layout: Layout
	theme: Theme
	language: string
	enableI8n: boolean
	title: string
	logo?: string
	name: string
	description: string
	copyright: string
	site: string
	iconfontUrl: string
}

export const config: GlobalConfig = {
	layout: {
		collapsed: false,
		waterMark: '',
		showDrawer: false,
		collapsedWidth: 64,
		headerHeight: 48,
		sideBarWidth: 200,
		contentWidth: 'Fluid',
		disableContentMargin: false,
		fixSiderbar: true,
		fixedHeader: false,
		headerTheme: 'dark',
		layout: 'side',
		navTheme: 'dark',
		splitMenus: true,
		menu: true,
		multiTab: false,
		multiTabFixed: false,
		colorWeak: false,
		gray: false,
		animationName: 'none',
	},
	theme: {
		menuColor: '#015b8a',
		primaryColor: '#0b5788', //4e8fad
		colorWeak: false,
	},
	// 全局设置 i18n 系统名字等
	language: navigator.language.includes('zh') ? 'zh_CN' : 'en_US',
	iconfontUrl: '//at.alicdn.com/t/c/font_4688701_v6ll3skbrtr.js',
	title: '库管系统',
	name: '库管系统',
	description: '库管系统',
	copyright: 'Copyright © 2023 - 2024  ims.riemann.tech',
	site: 'https://ims.riemann.tech',
	enableI8n: false,
}
console.log(navigator.language)
