<template>
  <vab-app v-show="show" />
</template>

<script setup>
import { useSettingsStore } from '/@/store/modules/settings'

defineOptions({
  name: 'App',
})

const settingsStore = useSettingsStore()
const { updateTheme } = settingsStore
const show = ref(false)

const resizeContainer = () => {
  let vh = window.innerHeight * 0.01
  const el = ref(null)
  useCssVar('--vh', el).value = `${vh}px`
}

onBeforeMount(() => {
  updateTheme()
  window.addEventListener('orientationchange', resizeContainer)
  window.addEventListener('resize', resizeContainer)
  resizeContainer()
})
</script>
