<template>
  <t-config-provider :global-config="config">
    <router-view />
    <Robot></Robot>
  </t-config-provider>
</template>

<script setup>
import { globalConfig } from '@/config/global';
import enUs from 'tdesign-vue-next/es/locale/en_US';
import zhCn from 'tdesign-vue-next/es/locale/zh_CN';
import { ref } from 'vue';
import { useAppStore, useUserStore } from './store';
const appStore = useAppStore();
const userStore = useUserStore();
// const lang = ref(appStore.language === 'zh_CN' ? cn : en);
const config = ref(
  Object.assign(appStore.language === 'zh_CN' ? zhCn : enUs, globalConfig)
);
if (userStore.user) {
  appStore.getFlowParams();
}
</script>
