<?php

declare(strict_types=1);

namespace App\Modules\Inventory\Application\Services;

final class WarehouseDocsRouteContext
{
    public static function dashboard(): string
    {
        return '/admin/dashboard';
    }

    public static function inventoryHome(): string
    {
        return '/inventory';
    }

    public static function index(): string
    {
        return '/inventory/warehouse-docs';
    }

    public static function view(int $id = 0): string
    {
        return '/inventory/warehouse-docs/view' . ($id > 0 ? ('?id=' . $id) : '');
    }

    public static function print(int $id = 0, string $format = ''): string
    {
        $query = [];
        if ($id > 0) {
            $query['id'] = $id;
        }
        if ($format !== '') {
            $query['format'] = $format;
        }
        return '/inventory/warehouse-docs/print' . (!empty($query) ? ('?' . http_build_query($query)) : '');
    }
}
