"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getIncludeListFromItemType = getIncludeListFromItemType;
const isSiteType_1 = require("../../content/isSiteType");
const internalContentUtils_1 = require("../../content/_internal/internalContentUtils");
const SiteBusinessRules_1 = require("../../sites/_internal/SiteBusinessRules");
const PageBusinessRules_1 = require("../../pages/_internal/PageBusinessRules");
/**
 * Gets the include list for the model type
 * @param model
 * @returns
 */
function getIncludeListFromItemType(model) {
    let includeList;
    if ((0, isSiteType_1.isSiteType)(model.item.type, model.item.typeKeywords)) {
        includeList = SiteBusinessRules_1.SiteVersionIncludeList;
    }
    else if ((0, internalContentUtils_1.isPageType)(model.item.type, model.item.typeKeywords)) {
        includeList = PageBusinessRules_1.PageVersionIncludeList;
    }
    else {
        throw TypeError("Entity type does not support versioning");
    }
    return includeList;
}
//# sourceMappingURL=getIncludeListFromItemType.js.map