---
import type { Media } from '@/types/sections/favorites-section.types';
import Photo from '@/components/photo.astro';
import Typography from '@/web/components/typography.astro';

export interface Props extends Media {}

const { image, title, type, url } = Astro.props;
---

<a href={url} target="_blank" class="flex w-full flex-col gap-3 transition duration-300 hover:translate-y-2">
  <Photo class="aspect-square rounded-lg object-cover shadow-md" src={image} alt={title} width={200} height={200} />
  <div class="gap-1">
    <Typography variant="tile-title">
      {title}
    </Typography>
    <Typography variant="tile-subtitle">
      {type}
    </Typography>
  </div>
</a>
