<script setup>
const props = defineProps({
  params: Object
})
</script>

<template>
  <div class="ag-origin-country">
    <img
      v-if="props.params?.data?.originCountryCode"
      :src="`/flags/${props.params.data.originCountryCode}.svg`"
      :alt="props.params.data.originCountryCode"
      class="ag-oc-flag"
    />
    <span>{{ props.params?.data?.originCountry || '' }}</span>
  </div>
</template>

<style scoped>
.ag-origin-country {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
}
.ag-oc-flag {
  width: 22px;
  height: auto;
  flex-shrink: 0;
}
</style>
