<script setup lang="ts">
import { onMounted } from "vue";
import { RouterView } from "vue-router";
import ToastHost from "@/components/common/ToastHost.vue";
import AppShell from "@/components/layout/AppShell.vue";
import { useAuthStore } from "@/stores/auth";

const auth = useAuthStore();

onMounted(async () => {
  if (!auth.checked) await auth.bootstrap();
});
</script>

<template>
  <AppShell>
    <RouterView />
  </AppShell>
  <ToastHost />
</template>
