<?php

namespace App\Enums;

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

enum EmploymentStatus: int
{
    use WithCommentEnum, WithValueEnum;

    case PERMANENT = 1;
    case CONTRACT = 2;
    case INTERN = 3;

    public function label(): string
    {
        return match ($this) {
            self::PERMANENT => 'Permanen',
            self::CONTRACT => 'Kontrak',
            self::INTERN => 'Magang',
        };
    }

    public function color(): string
    {
        return match ($this) {
            self::PERMANENT => 'emerald',
            self::CONTRACT => 'yellow',
            self::INTERN => 'lime',
        };
    }
}
