<script setup lang="ts">
import type { AcfImageFragment } from "#graphql/operations";

defineProps<{ image?: AcfImageFragment }>();
</script>

<template>
  <NuxtImg
    v-if="image"
    :src="image.src"
    :alt="image.alt"
    :width="image.mediaDetails?.width"
    :height="image.mediaDetails?.height"
    :style="{ objectPosition: image.objectPosition || 'center' }"
    placeholder
  />
</template>
