<template>
  <div class="flex flex-row flex-wrap gap-2 w-full min-h-fit">
    <NuxtPicture
      v-for="img in data?.images"
      loading="lazy"
      class="w-fit h-48 object-cover object-center"
      :src="baseUrl + img.url"
      :imgAttrs="{ class: 'w-fit h-48 object-cover object-center' }"
    />
  </div>
</template>

<script setup lang="ts">
import type { PropType } from "vue";
import type DynamicZoneGallery from "../../types/component/dynamicZoneGallery";

const baseUrl = useStrapiUrl().replace("/api", "");

defineProps({
  data: Object as PropType<DynamicZoneGallery>,
});
</script>
