<script setup lang="ts">
import { config } from './list-entry.cfg'
import type { McuOrderItem } from '~/models/mcu-order-item';

defineProps<{
  data: McuOrderItem[]
}>()

const emit = defineEmits<{
  requestItem: []
}>()

</script>

<template>
  <PubMyUiDataTable class="border mb-3 2xl:mb-4"
    v-bind="config"
    :rows="data"
  />
  <div class="-mx-1 [&_button]:mx-1">
    <Button @click="emit('requestItem')">
      <Icon name="i-lucide-plus" />
      Pilih Item
    </Button>
  </div>
</template>
