<?php

namespace App\Enums;

enum ReservationStatus: string
{
    case PENDING = 'pending';
    case APPROVED = 'approved';
    case REJECTED = 'rejected';
    case CANCELLED = 'cancelled';
    case COMPLETED = 'completed';

    public function label(): string
    {
        return match ($this) {
            self::PENDING => 'Onay Bekliyor',
            self::APPROVED => 'Onaylandı',
            self::REJECTED => 'Reddedildi',
            self::CANCELLED => 'İptal Edildi',
            self::COMPLETED => 'Tamamlandı',
        };
    }

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