<?php

namespace App\Domain\Manga\Domain\Model\ValueObject;

use App\Domain\Manga\Domain\Exception\InvalidMangaTitleException;

readonly class MangaTitle
{
    public function __construct(
        private string $value
    ) {
        if (empty(trim($value))) {
            throw new InvalidMangaTitleException('Manga title cannot be empty');
        }
    }

    public function getValue(): string
    {
        return $this->value;
    }
}
