<script setup lang="ts">
import { defineEmits, defineProps } from 'vue'

import type { GalleryEntry } from 'src/types/galleries/galleryList'

defineProps<{
  entry: GalleryEntry,
  id: string,
}>()

defineEmits<{
  (e: 'click', value: { event: Event, id: string }): void
}>()
</script>

<template lang="pug">
.gallery-embed(
  @click='$emit("click", { event: $event, id })'
)
  .image-wrapper
    img(
      :src='entry.thumbnailUrl || entry.url'
      :alt='entry.description || id'
    )
  p {{ id }}
</template>

<style scoped lang="sass">

</style>
