// windicss layers
import 'virtual:windi-base.css'
import 'virtual:windi-components.css'
// your custom styles here
import './styles/main.css'
// windicss utilities should be the last style import
import 'virtual:windi-utilities.css'
// windicss devtools support (dev only)
import 'virtual:windi-devtools'

import VueAnimXYZ from '@animxyz/vue'  // import AnimXZY vue package
import '@animxyz/core' 

// register vue composition api globally
import { createApp } from 'vue'
// import { createRouter, createWebHistory } from 'vue-router'
import { createI18n } from 'vue-i18n'
import { createHead, useHead } from '@vueuse/head'

import App from './App.vue'

import routes from './router'
import store from './store'

import 'a17t'

import { messages } from './modules/i18n'
// import GuestLayout from '~/layouts/GuestLayout.vue'
import AppLayout from '~/layouts/AppLayout.vue'
import SimpleLayout from '~/layouts/SimpleLayout.vue'

const app = createApp(App)

const i18n = createI18n({
  locale: 'es',
  legacy: false,
  fallbackLocale: ['es'],
  fallbackWarn: false,
  missing: (locale, key, instance) => {
    console.warn(`detect '${key}' key missing in '${locale}'`)
  },
  messages,
})

const head = createHead()
// const router = createRouter({
//   history: createWebHistory(),
//   routes,
// })
app.use(VueAnimXYZ)
app.use(store)
app.use(i18n)
app.use(routes)
// app.use(router)
app.use(head)
app.component('AppLayout', AppLayout)
app.component('SimpleLayout', SimpleLayout)
// app.component('GuestLayout', GuestLayout)
app.mount('#app')
