<?php

namespace App\Enums;

enum CoinMatterEnum: string
{
    case BALANCE_ADD = 'balance_add';
    case BALANCE_DEDUCT = 'balance_deduct';
    case WITHDRAW = 'withdraw';
    case REFERRAL_BONUS = 'referral_bonus';
    case QUIZ_PLAYED = 'quiz_played';
    case CONTEST_PARTICIPATION = 'contest_participation';

    public function title(): string
    {
        return match ($this) {
            self::BALANCE_ADD => 'Balance Add to user',
            self::BALANCE_DEDUCT => 'Balance Deduct from user',
            self::WITHDRAW => 'Withdraw made by user',
            self::REFERRAL_BONUS => 'Referral Bonus Given',
            self::QUIZ_PLAYED => 'Quiz Played by user',
        };
    }

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