<?php

declare(strict_types=1);

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

use InvalidArgumentException;

readonly class VolumeNumber
{
    public function __construct(
        private float $value
    ) {
        if ($value < 0) {
            throw new InvalidArgumentException('Volume number cannot be negative');
        }
    }

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