<script setup lang="ts">
import { getResponsiveSrc } from '#layers/utils/dataUtil'
import type { PageDataResourceGroup } from '#layers/types/api/pageData'

const props = defineProps<{
  resourcesData: PageDataResourceGroup
}>()

const displayText = props.resourcesData?.display?.text
const imageSrc = getResponsiveSrc(props.resourcesData?.res_path)
</script>

<template>
  <p>
    <BlocksVisualContent :text="displayText" :image-src="imageSrc" />
  </p>
</template>
