import { createApp, h } from 'vue'
import { createWebHistory, createRouter } from 'vue-router'

import App from './App.vue'
import NowPlaying from './components/now-playing.vue'
import GeneralXd from './components/general-xd.vue'
import './global.css'

const Home = {
  render() {
    return h('div', { class: 'wrapped', style: 'display: flex;' }, [h(GeneralXd), h(NowPlaying)])
  },
}

const routes = [
  { path: '/', component: Home },
  { path: '/nowplay', component: NowPlaying },
]

export const router = createRouter({
  history: createWebHistory(),
  routes,
})

const app = createApp(App)

app.use(router)
app.mount('#app')
