<template>
  <v-app>
    <AppShell>
      <RouterView />
    </AppShell>
    <AppSnackbar ref="snackbar" />
  </v-app>
</template>

<script setup>
import { onMounted, ref } from 'vue'
import AppShell from './components/AppShell.vue'
import AppSnackbar from './components/AppSnackbar.vue'

const snackbar = ref(null)

onMounted(() => {
  // Expose snackbar via a simple global so stores can call it without props.
  window.__fcToast = (opts) => snackbar.value?.open(opts)
})
</script>
