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

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

</script>

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