using BuildingBlock.Catalog.Contracts.Products;
using BuildingBlock.Catalog.Contracts.Responses;
using BuildingBlock.Inventory.Contracts.Requests;
using BuildingBlock.Inventory.Contracts.Responses;
using Furniture.Domain.Contracts;

namespace Furniture.Domain.Decisions;

/// <summary>
/// Defines domain decision boundary for furniture availability composition.
/// </summary>
public interface IFurnitureAvailabilityDecisionService
{
    /// <summary>
    /// Creates inventory capability request from furniture availability input.
    /// </summary>
    InventoryItemLookupRequest BuildInventoryRequest(FurnitureAvailabilityDecisionRequest request);

    /// <summary>
    /// Creates catalog capability request from furniture availability input.
    /// </summary>
    ProductContract BuildCatalogRequest(FurnitureAvailabilityDecisionRequest request);

    /// <summary>
    /// Composes final furniture availability response from capability responses.
    /// </summary>
    FurnitureAvailabilityDecisionResponse ComposeResponse(
        FurnitureAvailabilityDecisionRequest request,
        ProductContractResponse catalogResponse,
        InventoryItemLookupResponse inventoryResponse);
}
