<?php

namespace App\Modules\Sales\Support;

final class SalesReturnLifecycleRules
{
    public static function allowsApprove(SalesReturnStatus $current): bool
    {
        return $current === SalesReturnStatus::Draft;
    }

    public static function allowsReceive(SalesReturnStatus $current): bool
    {
        return $current === SalesReturnStatus::Approved;
    }

    public static function allowsReject(SalesReturnStatus $current): bool
    {
        return in_array($current, [SalesReturnStatus::Draft, SalesReturnStatus::Approved], true);
    }
}
