<script lang="ts">
  export let data: any;
</script>

<ul>
  {#each data.data as chapter}
    <li>
      {#if chapter.attributes.volume}
        Vol. {chapter.attributes.volume}
      {/if}
      Ch. {chapter.attributes.chapter}
      <span class="opaque">|</span>
      <a
        href={`https://mangadex.org/chapter/${chapter.id}`}
        target="_blank"
        rel="noopener noreferrer"
      >
        {chapter.attributes.title || 'Read'}
      </a>
    </li>
  {/each}
</ul>
