<template>
  <Dialog
    id="physical-sample"
    v-model:visible="isOpen"
    modal
    :draggable="false"
    dismissableMask="true"
    class="dialog"
    :closeOnEscape="true"
  >
    <header>
      <h2>Titre de la modal</h2>
    </header>
  </Dialog>
</template>

<script setup>
import Dialog from "primevue/dialog";
import { ref, watch } from "vue";
import { useDialogStore } from "../../stores/dialog";
import { useRoute, useRouter } from "vue-router";
import { usePageStore } from "../../stores/page.js";

// Variables
const router = useRouter();
const route = useRoute();
const isOpen = ref(true);
watch(isOpen, (newValue) => {
  router.push({ name: route.name });
});
const { page } = usePageStore();
const step = page.steps[page.steps.length - 1];
</script>

<style></style>
