<?php

namespace App\Enums;

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

enum VoucherType: int
{
    use WithCommentEnum, WithValueEnum;

    case FIXED = 1;
    case PERCENTAGE = 2;

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

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