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

let vehicles = await Promise.all(props.row.vehicles.map(async (i) => {
  const vehicle = await useEntities("vehicles").selectSingle(i)
  return vehicle?.licensePlate
}))

</script>

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