<script setup lang="ts">
import { imageSrc } from '../utils/imageHelper'

const props = defineProps({
  image: {
    type: String,
    required: true
  }
})

const image = imageSrc(props.image)
</script>

<template>
  <div class="slidev-layout h-full title">
    <div class="grid grid-cols-2 h-full">
      <div class="place-self-center">
        <slot />
      </div>
      <div class="image"></div>
    </div>
  </div>
</template>

<style scoped>
.image {
  block-size: 100%;
  background-image: v-bind(image);
  background-size: cover;
  background-position: center;
}
</style>
