<template>
	<a-config-provider :locale="locale" :theme="{
		algorithm:themes,
		token:{
			colorPrimary: primaryColor,
			colorError:'#FE7254'
		}
    }">
		<router-view/>
	</a-config-provider>
</template>

<script setup name="App">
import i18n from "@/locales";
import {useGlobalStore} from "@/store";
import {theme} from "ant-design-vue";
import {ThemeModeEnum} from "@/utils/enum";

const store = useGlobalStore();
const locale = i18n.global.messages[i18n.global.locale].lang;
const primaryColor = computed(() => store.themeColor);
const themes = computed(() => store.theme === ThemeModeEnum.REAL_DARK ? theme.darkAlgorithm : theme.defaultAlgorithm);
</script>
