<template>
  <router-view />
</template>

<script setup lang="ts">
import { defineComponent, onMounted } from 'vue';
import { useScheduleStore } from './stores/schedule';
import { useBoatStore } from './stores/boat';
import { useAuthStore } from './stores/auth';

defineComponent({
  name: 'OYS Borrow-a-Boat',
});

onMounted(async () => {
  await useAuthStore().init();
  await useScheduleStore().fetchIntervalTemplates();
  await useScheduleStore().fetchIntervals();
  await useBoatStore().fetchBoats();
});
</script>
