<?php

declare(strict_types=1);

namespace Kylin\Hr\Enums;

/**
 * 员工状态枚举
 */
enum EmployeeStatus: int
{
    case Active = 1;      // 在职
    case Trial = 2;       // 试用期
    case Resigned = 3;    // 已离职
    case Pending = 4;     // 待入职

    /**
     * 获取状态标签
     */
    public function label(): string
    {
        return match ($this) {
            self::Active   => '在职',
            self::Trial    => '试用期',
            self::Resigned => '已离职',
            self::Pending  => '待入职',
        };
    }

    /**
     * 获取状态颜色（Bootstrap语义色）
     */
    public function color(): string
    {
        return match ($this) {
            self::Active   => 'success',
            self::Trial    => 'primary',
            self::Resigned => 'danger',
            self::Pending  => 'warning',
        };
    }
}
