<script setup lang="ts">
import sLocale from '@core/locale.service';
import sTheme from '@core/theme.service';
import { computed } from 'vue';

const empty = computed<string>(() => new URL(`./assets/images/empty-${sTheme.theme}.png`, import.meta.url).href);
</script>

<template>
  <a-config-provider
    :locale="sLocale.ant"
    :theme="sTheme.ant"
    :autoInsertSpaceInButton="false"
    :wave="{ disabled: true }"
    :input="{ autocomplete: 'off' }"
  >
    <template #renderEmpty>
      <a-flex justify="center" align="center" :gap="8" vertical>
        <img height="40" :src="empty" />
        <a-typography-text disabled>{{ $t('暂无数据') }}</a-typography-text>
      </a-flex>
    </template>
    <a-app @contextmenu.prevent>
      <router-view />
    </a-app>
  </a-config-provider>
</template>
