<template>
  <Progress />
  <Notivue v-slot="item">
    <NotivueSwipe :item="item">
      <Notification :item="item" :theme="pastelTheme"> </Notification>
    </NotivueSwipe>
  </Notivue>
  <el-config-provider :locale="locale">
    <router-view v-slot="{ Component }">
      <component :is="Component" />
    </router-view>
  </el-config-provider>
</template>
<script setup lang="ts">
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { initWxConfig } from '@/utils/wxUtil/initWXConfig'
import { Notivue, NotivueSwipe, Notification, pastelTheme } from 'notivue'
import Progress from '@/components/common/Progress/index.vue'

const locale = ref(zhCn)

onMounted(() => {
  console.log(import.meta.env.MODE)
  // console.table(__CORE_LIB_VERSION__)
  if (import.meta.env.PROD) {
    initWxConfig().catch((error) => {
      console.warn('企业微信 SDK 初始化失败', error)
    })
  }
})
</script>
