import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import { createPinia } from 'pinia';
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'; // 引入中文语言包
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import GoEasy from 'goeasy'

const goeasy = GoEasy.getInstance({
    host:"hangzhou.goeasy.io",  //若是新加坡区域：singapore.goeasy.io
    appkey:"PC-a88037e060ed4753bb316ac7239e62d9",
    modules:['im']//根据需要，传入‘pubsub’或'im’，或数组方式同时传入
});

const app = createApp(App);
app.config.globalProperties.goeasy = goeasy;
export { goeasy };
app.use(ElementPlus, {
    locale: zhCn, // 配置中文
});
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
app.use(ElementPlus)      // 注册 ElementPlus
app.use(createPinia()); // 注册 Pinia
app.use(store); // 注册 store
app.use(router); // 注册 router
app.mount('#app');