<script lang="ts">
import type { Media } from "$lib/Data/AniList/media";
import { estimatedDayReading } from "$lib/Media/Manga/time";

export let mangaList: Media[] | undefined;
export let chapters: number;
</script>

<div class="category-grid pure-category category top-category">
  <div class="grid-item">
    <b>Manga</b>
  </div>
  <div class="grid-item">
    Time Read: {estimatedDayReading(chapters).toFixed(2)} days
  </div>
  <div class="grid-item">
    Completed: {mangaList?.length || 0}
  </div>
  <div class="grid-item">
    Chapters: {chapters}
  </div>
</div>
