<?php

namespace App\Modules\Inventory\Stock\Support;

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

    public static function allowsExecute(InventoryStockTransferStatus $current): bool
    {
        return $current === InventoryStockTransferStatus::Approved;
    }

    /**
     * @return list<InventoryStockTransferStatus>
     */
    public static function cancellableStates(): array
    {
        return [InventoryStockTransferStatus::Draft, InventoryStockTransferStatus::Approved];
    }
}
