<script setup>
const props = defineProps({
  row: {
    type: Object,
    required: true,
    default: {}
  }
})

let inventoryitems = await Promise.all(props.row.inventoryitems.map(async (i) => {
  const item = await useEntities("inventoryitems").selectSingle(i)
  return item?.name
}))

</script>

<template>
  <div v-if="props.row.inventoryitems">
    {{props.row.inventoryitems ? inventoryitems.join(", ") : ''}}
  </div>
</template>
