<?php

namespace PortalPeople\virtualstock\helpers;

use PortalPeople\virtualstock\constants\OrderStatus;
use PortalPeople\virtualstock\constants\ShipmentStatus;

class StatusHelper
{
    public static function orderLabel(string $status): string
    {
        return OrderStatus::label($status);
    }

    public static function shipmentLabel(string $status): string
    {
        return ShipmentStatus::label($status);
    }

    public static function isValidOrderStatus(string $status): bool
    {
        return OrderStatus::isValid($status);
    }

    public static function isValidShipmentStatus(string $status): bool
    {
        return ShipmentStatus::isValid($status);
    }

    public static function canTransitionOrder(string $from, string $to): bool
    {
        return OrderStatus::canTransitionTo($from, $to);
    }

    /** @return string[] */
    public static function nextOrderStatuses(string $status): array
    {
        return OrderStatus::nextStatuses($status);
    }

    public static function isShipmentTerminal(string $status): bool
    {
        return ShipmentStatus::isTerminal($status);
    }
}
