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

const countryCode = computed(() => {
  if (props.params.data.countryCode) return props.params.data.countryCode
  return props.params.data.countries?.filter(i => props.params.data.countryId == i.id)?.[0]?.CountryCode ?? 'DE'
})
</script>

<template>
  <div>
    <img :src="`/flags/${countryCode}.svg`" :alt="countryCode" class="agFlag" />
  </div>
</template>

<style>
.agFlag {
  padding-top: 5px;
  width: 33px;
  height: auto;
}
</style>