import { createSSRApp } from 'vue'
import App from './App.vue'
import AppIcon from './components/AppIcon.vue'
import NavBar from './components/NavBar.vue'
import * as utils from './utils/index.js'

// 将工具函数挂载到全局
globalThis.utils = utils

export function createApp() {
  const app = createSSRApp(App)
  app.component('AppIcon', AppIcon)
  app.component('NavBar', NavBar)
  return {
    app
  }
}