<template>
	<el-config-provider :locale="elementLocale">
		<router-view />
	</el-config-provider>
</template>

<script setup lang="ts">
import { computed } from 'vue'
import en from 'element-plus/es/locale/lang/en'
import zhCn from 'element-plus/es/locale/lang/zh-cn'

import { useI18n } from '@/composables/useI18n'

const { locale } = useI18n()

const elementLocale = computed(() => (locale.value === 'en-us' ? en : zhCn))
</script>

<style lang="less">
html,
body,
#app {
	height: 100%;
	width: 100%;
	margin: 0;
}
</style>
