<?php

namespace App\Enums;

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

enum RedemptionStatus: int
{
    use WithCommentEnum, WithValueEnum;

    case WAITING_PICKUP = 1;
    case PICKED_UP = 2;
    case EXPIRED = 3;

    public function label(): string
    {
        return match ($this) {
            self::WAITING_PICKUP => 'Menunggu Pengambilan',
            self::PICKED_UP => 'Sudah Diambil',
            self::EXPIRED => 'Kedaluwarsa',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::WAITING_PICKUP => 'yellow',
            self::PICKED_UP => 'emerald',
            self::EXPIRED => 'red',
        };
    }
}
