<?php

namespace App\Enums;

use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasLabel;

enum PaymentTransactionType: string implements HasColor, HasLabel
{
    case CHECKOUT = 'checkout';
    case SUBSCRIPTION_INVOICE = 'subscription_invoice';

    public function getLabel(): string
    {
        return match ($this) {
            self::CHECKOUT => __('enums.payment_transaction_type.checkout'),
            self::SUBSCRIPTION_INVOICE => __('enums.payment_transaction_type.subscription_invoice'),
        };
    }

    public function getColor(): string
    {
        return match ($this) {
            self::CHECKOUT => 'success',
            self::SUBSCRIPTION_INVOICE => 'info',
        };
    }
}
