<?php

declare(strict_types=1);

namespace App\Domain\Manga\Domain\Model;

use App\Domain\Manga\Domain\Model\ValueObject\ChapterNumber;
use App\Domain\Manga\Domain\Model\ValueObject\MangaTitle;
use App\Domain\Manga\Domain\Model\ValueObject\VolumeNumber;

readonly class AnalyzedFilename
{
    public function __construct(
        private MangaTitle $title,
        private ?ChapterNumber $chapterNumber = null,
        private ?VolumeNumber $volumeNumber = null
    ) {
    }

    public function getTitle(): MangaTitle
    {
        return $this->title;
    }

    public function getChapterNumber(): ?ChapterNumber
    {
        return $this->chapterNumber;
    }

    public function getVolumeNumber(): ?VolumeNumber
    {
        return $this->volumeNumber;
    }

    public function hasChapterNumber(): bool
    {
        return $this->chapterNumber !== null;
    }

    public function hasVolumeNumber(): bool
    {
        return $this->volumeNumber !== null;
    }
}
