<script lang="ts" setup>
defineEmits(['edit', 'delete'])
</script>

<template>
  <q-btn @click.stop icon="more_vert" color="grey" flat dense>
    <q-menu auto-close>
      <q-list dense>
        <q-item clickable @click.prevent.stop="() => $emit('edit')">
          <q-item-section>
            <div class="row items-center white  ">
              <q-icon name="edit" color="positive" />
              <span class="q-ml-sm">แก้ไข</span>
            </div>
          </q-item-section>
        </q-item>
        <q-item clickable @click.prevent.stop="() => $emit('delete')">
          <q-item-section>
            <div class="row items-center white ">
              <q-icon name="delete" color="negative" />
              <span class="q-ml-sm">ลบ</span>
            </div>
          </q-item-section>
        </q-item>
      </q-list>
    </q-menu>
  </q-btn>
</template>


<style scoped>
.white  {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block; 

}
</style>


