"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPropertyMap = getPropertyMap;
const getBasePropertyMap_1 = require("../../core/_internal/getBasePropertyMap");
/**
 * Returns an Array of IPropertyMap objects
 * that define the projection of properties from a IModel to an IHubProject
 * @returns
 * @private
 */
function getPropertyMap() {
    const map = (0, getBasePropertyMap_1.getBasePropertyMap)();
    /**
     * content-specific mappings. Note: we do not need to explicitly map
     * properties from the content item's data.view into the entity's view
     * because that mapping is already defined in the base property map
     */
    // NOTE: we may want to move these into getBaseProprtyMap(), see:
    // https://github.com/Esri/hub.js/pull/993#discussion_r1134005511
    map.push({ entityKey: "permissions", storeKey: "data.permissions" });
    map.push({
        entityKey: "licenseInfo",
        storeKey: "item.licenseInfo",
    });
    map.push({
        entityKey: "size",
        storeKey: "item.size",
    });
    // override basePropertyMap for content-specific properties
    const viewPropIndex = map.findIndex((m) => m.entityKey === "view");
    if (viewPropIndex > -1) {
        map[viewPropIndex].storeKey = "item.properties.view";
    }
    else {
        map.push({ entityKey: "view", storeKey: "item.properties.view" });
    }
    // features is intentionally left out
    // TODO: look into composeContent() for what we can add here
    return map;
}
//# sourceMappingURL=getPropertyMap.js.map