<template>
  <BoatReservationComponent v-model="reservation" />
</template>

<script setup lang="ts">
import BoatReservationComponent from 'src/components/BoatReservationComponent.vue';
import { useReservationStore } from 'src/stores/reservation';
import { Reservation } from 'src/stores/schedule.types';
import { onMounted, ref } from 'vue';
import { useRoute } from 'vue-router';

const reservation = ref<Reservation>();

onMounted(async () => {
  const id = useRoute().params.id as string;
  reservation.value = await useReservationStore().getReservationById(id);
});
</script>
