import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import './assets/styles.css'

const saved = localStorage.getItem('theme')
if (saved) {
  document.documentElement.setAttribute('data-theme', saved)
} else if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
  document.documentElement.setAttribute('data-theme', 'dark')
}

const app = createApp(App)
app.use(router)
app.mount('#app')
