<template>
	<component :is="currentCity" />
</template>

<script lang="tsx" setup name="knowledgeRetrieval">
import { defineAsyncComponent, computed } from 'vue';
import { useThemeConfig } from '@/stores/themeConfig';
import { storeToRefs } from 'pinia';

// 引入组件
const YiBin = defineAsyncComponent(() => import('@/views/knowledge/retrieval/YBRetrieval.vue')); // 宜宾知识库检索
const ZiGong = defineAsyncComponent(() => import('@/views/knowledge/retrieval/ZGRetrieval.vue')); // 自贡知识库检索
const LuZhou = defineAsyncComponent(() => import('@/views/knowledge/retrieval/ZGRetrieval.vue')); // 泸州知识库检索

const storesThemeConfig = useThemeConfig();
const { themeConfig } = storeToRefs(storesThemeConfig);

const COMPONENT_LIST = {
	YiBin,
	ZiGong,
	LuZhou,
};
// 当前地州市
const currentCity = computed(() => {
	return COMPONENT_LIST[themeConfig.value.appScope];
});
</script>
