import { createSSRApp } from 'vue'
import App from './App.vue'
import store, { useUserStore } from './store'
import { routeInterceptor, requestInterceptor, prototypeInterceptor } from './interceptors'
import 'virtual:uno.css'
import '@/style/index.scss'
import '@/style/fonts.css'
import '@/core/themes/default.scss'
import { pageSpy } from './core/utils/page-spy'

export function createApp() {
  const app = createSSRApp(App)
  app.use(store)
  app.use(routeInterceptor)
  app.use(requestInterceptor)
  app.use(prototypeInterceptor)
  pageSpy.init()
  return {
    app,
  }
}
