<script setup>
const props = defineProps({
  variant: Object,
});

const showModal = ref(null);

function displayModal() {
  showModal.value = {
    title: "Cập nhật sản phẩm",
    width: "90%",
    height: "400px",
    component: "imports/EditProduct",
    vbind: { variant: props.variant },
  };
}
</script>

<template>
  <a @click="displayModal">
    <span class="icon">
      <Icon
        name="material-symbols:edit-outline-rounded"
        :size="18"
      />
    </span>
    <Modal
      v-if="showModal"
      v-bind="showModal"
      @close="showModal = null"
    />
  </a>
</template>
