<script setup lang="ts">
//
import * as CB from '~/components/pub/my-ui/combobox'
import type { MaterialPackage } from '~/models/material-package';

//
const props =defineProps<{
  data: MaterialPackage[]
}>()

const model = defineModel()

const items = computed(() => {
  return props.data.map((item) => {
    return {
      label: item.name,
      value: item.code,
    }
  })
})

</script>

<template>
  <div class="mb-4 2xl:mb-5">
    <div class="font-semibold text-sm 2xl:text-base mb-2">
      Paket BMHP
    </div>
    <div class="max-w-[600px]">
      <CB.Combobox :items="items" v-model="model" />
    </div>
  </div>
</template>
