<?php

namespace App\Enums;

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

enum SalaryAdjustmentType: int
{
    use WithCommentEnum, WithValueEnum;

    case BONUS = 1;
    case DEDUCTION = 2;

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

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