import { createSSRApp } from 'vue'

import setupInterceptors from '@/interceptors'
import { setupI18n } from '@/locale'
import { setupStores } from '@/stores'
import * as Pinia from 'pinia'

import App from './App.vue'

import 'virtual:svg-icons-register'

import 'virtual:uno.css'
import '@/static/styles/index.scss'

export function createApp() {
  const app = createSSRApp(App)

  setupI18n(app)
  setupStores(app)
  setupInterceptors(app)

  return {
    app,
    Pinia,
  }
}
