import { SortBy } from '../features/sort/sort.js';
export function buildFetchProductListingResponse(response = {}) {
    return {
        response: {
            sort: response.sort ?? {
                appliedSort: { sortCriteria: SortBy.Relevance },
                availableSorts: [{ sortCriteria: SortBy.Relevance }],
            },
            pagination: {
                page: 0,
                perPage: 0,
                totalEntries: 0,
                totalPages: 0,
                totalProducts: 0,
                totalSpotlightContent: 0,
                ...response.pagination,
            },
            facets: response.facets ?? [],
            products: response.products ?? [],
            results: response.results ?? [],
            responseId: response.responseId ?? '',
            triggers: response.triggers ?? [],
        },
    };
}
