import main from './src/main.vue';

import {nextTick,createApp} from 'vue';

import popup from "$utils/tool/popup";

import request from "$utils/request";

import store from '../../store'

import {PopupExportComponent} from "$popup/popup-export/const";

export default {

    install(app:any){

        nextTick(()=>{

            // @ts-ignore
            popup.$popup = createApp(main).use(request).use(store).mount('#popup');

            for (let key in popup) {
                if (popup.hasOwnProperty(key)) {
                    app.config.globalProperties[key] = popup[key];
                }
            }

            // popup.$popup.open(PopupExportComponent.image,{
            //     src:'https://www.antdv.com/components/rate-cn/',
            //     webview:true
            // });
        });

    }

}
