<?php

namespace App\Enums;

enum TransactionMatterEnum: string
{
    case DEPOSIT = 'deposit';

    case WITHDRAW = 'withdraw';

    case ADD_COIN = 'add_coin';

    public function label(): string
    {
        return match ($this) {
            self::DEPOSIT => 'Deposit',
            self::WITHDRAW => 'Withdraw',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::DEPOSIT => 'success',
            self::WITHDRAW => 'danger',
            default => 'success',
        };
    }

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