<script>
  export let id;
  export let link;
//   export let poster;
  export let show;

  let favorited = false;

  function toggleFavorite() {
    favorited = !favorited;
  }
</script>

<style>
  .tile {
    width: 400px;
    margin: 10px;
    text-align: center;
    border: 1px solid #030000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: #00000069 0px 5px 10px;
    transition: all 0.2s ease;
    position: relative;
  }

  .tile:hover {
    transform: scale(1.05);
    box-shadow: #00000069 0px 10px 15px;
  }

  .tile img {
    width: 100%;
    height: auto;
    display: block;
  }

  .tile .title {
    padding: 10px;
    color: #eeeeee;
    background-color: #030000be;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  .tile:hover .title {
    transform: translateY(0);
    opacity: 1;
  }

  .favorite-star {
    position: absolute;
    top: 0px;
    right: 8px;
    font-size: 30px;
    color: #ffffff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-shadow: #000000 1px 1px 10px;
  }

  .tile:hover .favorite-star {
    opacity: 1;
  }

  .favorite-star.favorited {
    color: gold;
  }
</style>

<div class="tile" data-id={id}>
  <a href={`/show/${link}`}>
    <!-- <img src={poster} alt={show} /> -->
  </a>
  <div class="title">{show}</div>
</div>
