<script lang="ts">
  import ImageTile from "./ImageTile.svelte";
  import type { Snippet } from 'svelte';
  
  
  interface Props {
    src: string;
    href: string;
    target?: "_self" | "_blank" | "_parent" | "_top";
    children?: Snippet;
  }

  let {
    src,
    href,
    target = "_self",
    children
  }: Props = $props();
</script>

<div>
  <ImageTile {src}>
    <a {href} {target} class="flex items-center justify-center h-full">
      {@render children?.()}
    </a>
  </ImageTile>
</div>
