<template>
  <ConfigProvider :locale="getAntdLocale" :autoInsertSpaceInButton="false">
    <AppProvider>
      <RouterView />
    </AppProvider>
  </ConfigProvider>
</template>

<script lang="ts" setup>
import { ConfigProvider } from 'ant-design-vue';
import { AppProvider } from '/@/components/Application';
import { useTitle } from '/@/hooks/web/useTitle';
import { useLocale } from '/@/locales/useLocale';
import { useUserStore } from './store/modules/user';
import eventBus from './utils/eventBus';
// support Multi-language
const { getAntdLocale } = useLocale();
useTitle();
const userStore = useUserStore();
eventBus.on("sysAdminOut", () => userStore.logout(true))
</script>
