<template>
  <ConfigProvider :locale="<%= enableTranslation ? 'getAntdLocale' : 'antdLocale'%>">
    <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';
<%_ if (enableTranslation) { _%>
  import { useLocale } from '@/i18n/useLocale';
<%_ } else { _%>
  import antdLocale from 'ant-design-vue/es/locale/zh_CN';
<%_ } _%>

  import 'dayjs/locale/zh-cn';

  // begcode-please-regenerate-this-file 如果您不希望重新生成代码时被覆盖，将please修改为don't ！！！

  <%_ if (enableTranslation) { _%>
  // support Multi-language
  const { getAntdLocale } = useLocale();
<%_ } _%>

  // Listening to page changes and dynamically changing site titles
  useTitle();
</script>
