<?php

namespace App\Enums;

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

enum CreditProductType: string implements HasColor, HasLabel
{
    case MONTHLY = 'monthly';
    case ONE_TIME = 'one_time';

    public function getLabel(): string
    {
        return match ($this) {
            self::MONTHLY => __('enums.credit_product_type.monthly'),
            self::ONE_TIME => __('enums.credit_product_type.one_time'),
        };
    }

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