<?php

namespace App\Enums;

use App\Traits\Enums\WithCommentEnum;
use App\Traits\Enums\WithValueEnum;

enum SalaryAdjustmentType: int
{
    use WithCommentEnum, WithValueEnum;

    case BONUS = 1;
    case DEDUCTION = 2;

    public function label(): string
    {
        return match ($this) {
            self::BONUS => 'Bonus',
            self::DEDUCTION => 'Potongan',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::BONUS => 'emerald',
            self::DEDUCTION => 'red',
        };
    }
}
