<?php
namespace Incoviba\Model\Venta\Promotion;

enum State: int
{
    case ACTIVE = 1;
    case INACTIVE = 0;

    public static function name(int $state): string
    {
        return match ($state) {
            self::ACTIVE => 'active',
            self::INACTIVE => 'inactive',
            default => throw new \InvalidArgumentException('Unexpected match value')
        };
    }
}