<script setup lang="ts">
import Toast from 'primevue/toast'
import { useAuthStore } from './stores/auth'
import { onMounted } from 'vue'
import { initUpdateCheck } from './utils/appUpdate'

const authStore = useAuthStore()

onMounted(() => {
  authStore.loadFromStorage()
  // Auto-Update Check (nur in Capacitor/Android App)
  initUpdateCheck()
})
</script>

<template>
  <Toast position="top-right" />
  <router-view />
</template>

<style>
html, body, #app {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}
</style>
