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

const visible = ref(false);
const invoiceNumber = ref("");

defineExpose({
  onDisplay: _invoiceNumber => {
    visible.value = true;
    invoiceNumber.value = _invoiceNumber;
  }
});
</script>

<template>
  <el-dialog
    v-model="visible"
    :close-on-click-modal="false"

    :close-on-press-escape="false"
    width="1040px"
    @close="invoiceNumber = ''"
  >
    <Invoice :inv-number="invoiceNumber" type="sale" />
  </el-dialog>
</template>
