<?php

namespace Modules\Payroll\Enums;

enum EmployeeLoansEnum: string
{
    case Pending = 'pending';
    case Approved = 'approved';
    case Running = 'running';
    case Completed = 'completed';
    case Cancelled = 'cancelled';

    public const PENDING = self::Pending->value;
    public const APPROVED = self::Approved->value;
    public const RUNNING = self::Running->value;
    public const COMPLETED = self::Completed->value;
    public const CANCELLED = self::Cancelled->value;

    public static function casesAsArray(): array
    {
        return array_map(fn(self $case) => $case->value, self::cases());
    }
}
