<template>
  <ConfigProvider :locale="getAntdLocale">
    <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 { useLocale } from '/@/locales/useLocale';
  import { useUserStoreWithOut } from '/@/store/modules/user';
  import { useAppStoreWithOut } from '/@/store/modules/app';
  import { useMessage } from '/@/hooks/web/useMessage';

  // support Multi-language
  const { createConfirm } = useMessage();
  const { getAntdLocale } = useLocale();
  const appStore = useAppStoreWithOut();
  let token = localStorage.getItem('token');
  if (token) {
    const userStore = useUserStoreWithOut();
    userStore.setToken(token);
    // localStorage.removeItem('token');
  }
  // Listening to page changes and dynamically changing site titles
  useTitle();
</script>

<style lang="less">
.desc-wrap-BasicTable {
  background-color: #f0f2f5;
  .vben-basic-table-form-container {
    padding: 0;
  }
}
.ant-checkbox-disabled + span {
  color: rgba(0, 0, 0, 0.85) !important;
}

.ant-modal div[aria-hidden="true"] {
  display: none !important;
}
</style>
