<?php

namespace App\Enums;

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

enum PriceRequestStatus: int
{
    use WithCommentEnum, WithValueEnum;

    case PENDING = 1;
    case APPROVED = 2;
    case REJECTED = 3;

    public function label(): string
    {
        return match ($this) {
            self::PENDING => 'Menunggu',
            self::APPROVED => 'Disetujui',
            self::REJECTED => 'Ditolak',
        };
    }

    public function color()
    {
        return match ($this) {
            self::PENDING => 'gray',
            self::APPROVED => 'emerald',
            self::REJECTED => 'red',
        };
    }
}
