<?php

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

use App\Domain\Manga\Domain\Exception\InvalidMangaIdException;

readonly class MangaId
{
    public function __construct(
        private string $value
    ) {
        if (empty($value)) {
            throw new InvalidMangaIdException('Manga ID cannot be empty');
        }
    }

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

    public function equals(self $other): bool
    {
        return $this->value === $other->value;
    }
}
