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

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

// 引入组件
const YiBin = defineAsyncComponent(() => import('@/views/statistics/order/YBVisitCount.vue')); // 宜宾回访量统计
const ZiGong = defineAsyncComponent(() => import('@/views/statistics/order/ZGVisitCount.vue')); // 自贡回访量统计
const LuZhou = defineAsyncComponent(() => import('@/views/statistics/order/ZGVisitCount.vue')); // 泸州回访量统计

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

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