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

<template>
  <a
    @click="
      showModal = {
        component: 'imports/EditProduct',
        title: 'Cập nhật sản phẩm',
        width: '90%',
        height: '400px',
        vbind: { variant: props.variant },
      }
    "
  >
    <span class="icon">
      <Icon
        name="material-symbols:edit-outline-rounded"
        :size="18"
      />
    </span>
  </a>
  <Modal
    v-if="showModal"
    v-bind="showModal"
    @close="showModal = null"
  />
</template>
