<?php

declare(strict_types=1);

namespace App\Domain\Reader\Domain\Model;

use App\Domain\Reader\Domain\ValueObject\ChapterId;

readonly class ChapterContext
{
    public function __construct(
        private ChapterId $id,
        private ?ChapterId $previousChapterId,
        private ?ChapterId $nextChapterId,
        private string $mangaId,
        private string $mangaTitle,
        private float $number,
        private ?string $chapterTitle,
        private ?string $cbzPath,
        private ?int $volume,
        private int $totalPages,
        private bool $isVisible,
        private \DateTimeImmutable $createdAt,
        private ?string $pagesDirectory = null,
    ) {
    }

    public function getId(): ChapterId
    {
        return $this->id;
    }

    public function getPreviousChapterId(): ?ChapterId
    {
        return $this->previousChapterId;
    }

    public function getNextChapterId(): ?ChapterId
    {
        return $this->nextChapterId;
    }

    public function getMangaId(): string
    {
        return $this->mangaId;
    }

    public function getMangaTitle(): string
    {
        return $this->mangaTitle;
    }

    public function getNumber(): float
    {
        return $this->number;
    }

    public function getChapterTitle(): ?string
    {
        return $this->chapterTitle;
    }

    public function getCbzPath(): ?string
    {
        return $this->cbzPath;
    }

    public function getPagesDirectory(): ?string
    {
        return $this->pagesDirectory;
    }

    public function getVolume(): ?int
    {
        return $this->volume;
    }

    public function getTotalPages(): int
    {
        return $this->totalPages;
    }

    public function isVisible(): bool
    {
        return $this->isVisible;
    }

    public function getCreatedAt(): \DateTimeImmutable
    {
        return $this->createdAt;
    }
}
