<?php
declare(strict_types=1);

namespace App\Modules\Inventory;

use App\Core\Contracts\StockManagerInterface;
use App\Modules\Inventory\Services\StockService;

final class StockManagerAdapter implements StockManagerInterface
{
    public function moveStock(array $data): int
    {
        return StockService::moveStock($data);
    }

    public function getAvailableQuantity(int $itemId, int $warehouseId): string
    {
        return StockService::getAvailableQuantity($itemId, $warehouseId);
    }

    public function getTotalStock(int $itemId): string
    {
        return StockService::getTotalStock($itemId);
    }

    public function getMovements(int $itemId, ?int $warehouseId = null, int $limit = 50): array
    {
        return StockService::getMovements($itemId, $warehouseId, $limit);
    }
}
