<?php

namespace App\Enums;

use App\Traits\Enums\WithCommentEnum;
use App\Traits\Enums\WithValueEnum;

enum VoucherType: int
{
    use WithCommentEnum, WithValueEnum;

    case FIXED = 1;
    case PERCENTAGE = 2;

    public function label(): string
    {
        return match ($this) {
            self::FIXED => 'Nominal',
            self::PERCENTAGE => 'Persentase',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::FIXED => 'blue',
            self::PERCENTAGE => 'pink',
        };
    }
}
