"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getItemTypeFromMatchableType = getItemTypeFromMatchableType;
const defaults_1 = require("../../pages/defaults");
const defaults_2 = require("../../sites/defaults");
const HubSites_1 = require("../../sites/HubSites");
/**
 * Given a MatchableType, return the corresponding item type
 * if the type is specific enough. Otherwise, return null.
 * @param type
 * @param isPortal
 * @returns
 */
function getItemTypeFromMatchableType(type, isPortal) {
    switch (type) {
        case "project":
            return "Hub Project";
        case "initiative":
            return "Hub Initiative";
        case "site":
            return isPortal ? HubSites_1.ENTERPRISE_SITE_ITEM_TYPE : defaults_2.HUB_SITE_ITEM_TYPE;
        case "page":
            return isPortal ? defaults_1.ENTERPRISE_PAGE_ITEM_TYPE : defaults_1.HUB_PAGE_ITEM_TYPE;
        case "content":
            return null; // content can be any type
    }
}
//# sourceMappingURL=getItemTypeFromMatchableType.js.map