import type { AdvConfig, AdvGameConfig, AdvThemeConfig } from '@advjs/types' import { defaultAdvConfig } from '@advjs/core' import { computed, ref } from 'vue' import { setupAdvContext } from '../setup/context' export const gameConfig = ref(defaultAdvConfig.gameConfig as AdvGameConfig) export function initAdvContext() { const config = computed(() => { return { ...defaultAdvConfig, showCharacterAvatar: true, } }) const themeConfig = computed(() => defaultAdvConfig.themeConfig) const advContext = setupAdvContext({ config, gameConfig: computed(() => gameConfig.value), themeConfig, }) return advContext }