import App from '@/App'
import * as Pinia from 'pinia'
import globalFunction from '@/common/globalFunction'
import '@/lib/string-similarity.min.js'
import similarityJobs from '@/utils/similarity_Job.js';
import NoBouncePage from '@/components/NoBouncePage/NoBouncePage.vue'

import {
    createSSRApp,
} from 'vue'

// 全局组件
export function createApp() {
    const app = createSSRApp(App)

    app.component('NoBouncePage', NoBouncePage)

    app.provide('globalFunction', {
        ...globalFunction,
        similarityJobs
    });
    app.provide('deviceInfo', globalFunction.getdeviceInfo());

    app.use(Pinia.createPinia());
    return {
        app,
        Pinia
    }
}