<?php

declare(strict_types=1);

namespace App\Enums;

use Filament\Support\Contracts\HasLabel;

enum BonusType: string implements HasLabel
{
    case Performance = 'performance';
    case Holiday = 'holiday';
    case Retention = 'retention';
    case Other = 'other';

    public function getLabel(): string
    {
        return match ($this) {
            self::Performance => __('enums.bonus_type.performance'),
            self::Holiday => __('enums.bonus_type.holiday'),
            self::Retention => __('enums.bonus_type.retention'),
            self::Other => __('enums.bonus_type.other'),
        };
    }

    public function label(): string
    {
        return $this->getLabel();
    }

    public function color(): string
    {
        return match ($this) {
            self::Performance => 'success',
            self::Holiday => 'primary',
            self::Retention => 'info',
            self::Other => 'gray',
        };
    }

    public function icon(): string
    {
        return match ($this) {
            self::Performance => 'heroicon-o-star',
            self::Holiday => 'heroicon-o-gift',
            self::Retention => 'heroicon-o-hand-raised',
            self::Other => 'heroicon-o-banknotes',
        };
    }
}
