"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ogcItemToSearchResult = ogcItemToSearchResult;
const portalSearchItems_1 = require("../portalSearchItems");
async function ogcItemToSearchResult(ogcItem, includes, requestOptions) {
    // OGC Api stuffs the item wholesale in `.properties`
    // NOTE: the properties hash may also have some extraneous members such
    // as `license` and `source` if the OgcItem came from the index.
    const pseudoItem = ogcItem.properties;
    const result = await (0, portalSearchItems_1.itemToSearchResult)(pseudoItem, includes, requestOptions);
    // Expose extraneous members like `license` and `source`
    result.source = ogcItem.properties.source;
    result.license = ogcItem.properties.license;
    return result;
}
//# sourceMappingURL=ogcItemToSearchResult.js.map