<?php

namespace App\Enums;

enum WithdrawStatusEnum: string
{
    case PENDING = 'pending';

    case REJECTED = 'rejected';

    case APPROVED = 'approved';

    public function label(): string
    {
        return match ($this) {
            self::PENDING => 'Pending',
            self::REJECTED => 'Rejected',
            self::APPROVED => 'Approved',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::PENDING => 'warning',
            self::REJECTED => 'danger',
            self::APPROVED => 'success',
            default => 'warning',
        };
    }

    public static function values(): array
    {
        return array_column(self::cases(), 'value');
    }
}
