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

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

// 引入组件
const YiBin = defineAsyncComponent(() => import('@/views/tels/callLog/ybCallLog.vue')); // 宜宾通话记录
const ZiGong = defineAsyncComponent(() => import('@/views/tels/callLog/zgCallLog.vue')); // 自贡通话记录
const LuZhou = defineAsyncComponent(() => import('@/views/tels/callLog/zgCallLog.vue')); // 泸州通话记录

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

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