<?php

namespace App\Enums;

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

enum EmploymentStatus: int
{
    use WithCommentEnum, WithValueEnum;

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

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

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