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

const props = 
  defineProps<{
    nameId: string

  }>()


</script>

<template>
  <q-btn @click.stop icon="more_vert" color="grey" flat dense :id="props.nameId">
    <q-menu auto-close>
      <q-list dense>
        <q-item clickable @click="() => $emit('edit')" id="FileltemActionEdit">
          <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="() => $emit('delete')"
          id="FileltemActiondelete"
        >
          <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>
