<template>
  <el-config-provider :locale="zhCn" :size="assemblySize" :button="buttonConfig">
    <router-view />
  </el-config-provider>
</template>

<script setup lang="ts">
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { useTheme } from '@/utils/useTheme'
import { useGlobalStore } from '@/stores/modules/global'

// init theme
const { initTheme } = useTheme()
initTheme()

// element assemblySize
const globalStore = useGlobalStore()
const assemblySize = computed(() => globalStore.assemblySize)

// element button config
const buttonConfig = { autoInsertSpace: false }
</script>
