"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEntityTypeFromType = getEntityTypeFromType;
/**
 * @private
 * Given a type (e.g. "Hub Site Application") return the appropriate entity type
 * that can be used as a `targetEntity` in an `IQuery`
 * @param type
 * @returns
 */
function getEntityTypeFromType(type) {
    // Default to item, as it's the most common
    let etype = "item";
    // Some are just downcased, so we can check them with an array
    if (["group", "event", "user", "channel", "organization"].includes(type.toLowerCase())) {
        etype = type.toLocaleLowerCase();
    }
    // Group Member is just weird
    if (type.toLowerCase() === "group member") {
        etype = "groupMember";
    }
    return etype;
}
//# sourceMappingURL=getEntityTypeFromType.js.map