<script setup>
import { useResourceStore } from "@/stores/ResourceStore";
import { useSettingsStore } from "@/stores/SettingsStore";
import { storeToRefs } from "pinia";
import ReturnModal from "@/components/ReturnModal.vue";
import { onBeforeMount } from "vue";

const { apiKey, settingsUrl } = useSettingsStore();
const { returned } = storeToRefs(useResourceStore());

onBeforeMount(() => {
  returned.value = {
    ...window.gcargo.returned,
  };
});
</script>
<template>
  <div v-if="apiKey">
    <ReturnModal v-model="returned" />
  </div>
</template>
