<script setup lang="ts">
import enUS from "ant-design-vue/es/locale/en_US";
import zhCN from "ant-design-vue/es/locale/zh_CN";
import { computed } from "vue";
import { useI18n } from "vue-i18n";

import ImageUploadProgressOverlay from "@/components/ImageUploadProgressOverlay.vue";

const { locale } = useI18n();
const antLocale = computed(() => (locale.value === "en-US" ? enUS : zhCN));
</script>

<template>
  <a-config-provider
    :locale="antLocale"
    :theme="{
      token: {
        colorPrimary: '#1677ff',
        borderRadius: 6,
        colorBgLayout: '#f0f2f5',
      },
    }"
  >
    <a-app class="app-root">
      <router-view />
      <ImageUploadProgressOverlay />
    </a-app>
  </a-config-provider>
</template>
