<script setup lang="ts">
import { NConfigProvider } from 'naive-ui'
import { NaiveProvider } from '@/components/common'
import { useTheme } from '@/hooks/useTheme'
import { useLanguage } from '@/hooks/useLanguage'
import zhCN from 'ant-design-vue/es/locale/zh_CN';

const { theme, themeOverrides } = useTheme()
const { language } = useLanguage()
</script>

<template>
  <NConfigProvider
    class="h-full"
    :theme="theme"
    :theme-overrides="themeOverrides"
    :locale="language"
  >
    <a-config-provider :locale="zhCN">
    <NaiveProvider>
      <RouterView />
    </NaiveProvider>
    </a-config-provider>
  </NConfigProvider>
</template>
<style>
:root{
  --el-color-primary:#764CF6!important;
  --n-loading-color:#764CF6!important;
  --n-caret-color:#764CF6!important;

}
:where(.css-dev-only-do-not-override-19yxfbp).ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled){
  background-color: #dfd7f4;
}
:where(.css-dev-only-do-not-override-19yxfbp).ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector{
  border-color: #764CF6!important;;
}
.ant-select-focused:where(.css-dev-only-do-not-override-19yxfbp).ant-select:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer) .ant-select-selector{
  border-color: #764CF6!important;;
}
.n-layout-scroll-container{
  padding-right: 5px;
}
</style>
