<script setup lang="ts">
import { ref } from "vue";
import Invoice from "/@/components/Invoice";

const state = ref({
  invNumber: "",
  visible: false
});


defineExpose({
  open: (invNumber: string) => { 
    state.value.invNumber = invNumber;
    state.value.visible = true;
  }
})
</script>

<template>
  <ElDialog 
   v-model="state.visible" 
   :close-on-click-modal="false"
   :close-on-press-escape="false"
  >
    <Invoice :inv-number="state.invNumber" type="sale" />
  </ElDialog>
</template>
