import { createSSRApp } from "vue";
import App from "./App.vue";
import { CLIENT_ID,NETWORK_ENV } from '@/enums/cacheEnums';
import '@/static/font/iconfont.css'


// 注册自定义组件
import customShowModal from '@/components/customShowModal.vue'

// pinia
import { createPinia } from 'pinia'
const pinia = createPinia()


export function createApp() {

	const app = createSSRApp(App);

	// 全局变量
	app.config.globalProperties.$CLIENT_ID = CLIENT_ID;
	app.config.globalProperties.$NETWORK_ENV = NETWORK_ENV;

	// 全局自定义组件
	app.component('customShowModal', customShowModal);
	
	app.use(pinia)

	return {
		app,
	};
}
