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

export interface Props {
  value: Media;
}

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

<a href={url} class="flex w-full max-w-[120px] flex-col gap-3 transition duration-300 hover:translate-y-2">
  <Photo class="rounded-lg shadow-md aspect-square object-cover" 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>
