<?php

namespace App\Enums;

enum CommissionType: string
{
    case Percentage = 'PERCENTAGE';
    case Fixed = 'FIXED';

    /**
     * @return list<string>
     */
    public static function values(): array
    {
        return array_column(self::cases(), 'value');
    }

    public function label(): string
    {
        return match ($this) {
            self::Percentage => 'Percentage',
            self::Fixed => 'Fixed',
        };
    }
}
