"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getDefaultEntitySettings = getDefaultEntitySettings;
const entitySettingsType_1 = require("../enums/entitySettingsType");
const DISCUSSION_SETTINGS = {
    discussions: {
        allowedChannelIds: null,
        allowedLocations: null,
    },
};
const DEFAULT_ENTITY_SETTINGS_BY_ENTITY_TYPE = {
    discussion: {
        type: entitySettingsType_1.EntitySettingType.CONTENT,
        settings: Object.assign({}, DISCUSSION_SETTINGS),
    },
    site: null,
    project: null,
    initiative: null,
    initiativeTemplate: null,
    page: null,
    content: {
        type: entitySettingsType_1.EntitySettingType.CONTENT,
        settings: Object.assign({}, DISCUSSION_SETTINGS),
    },
    organization: null,
    org: null,
    group: {
        type: entitySettingsType_1.EntitySettingType.GROUP,
        settings: Object.assign({}, DISCUSSION_SETTINGS),
    },
    template: null,
    survey: null,
    event: null,
    user: null,
    channel: null,
};
function getDefaultEntitySettings(entityType) {
    if (!DEFAULT_ENTITY_SETTINGS_BY_ENTITY_TYPE[entityType]) {
        throw new Error(`no default entity settings defined for ${entityType}`);
    }
    return {
        type: DEFAULT_ENTITY_SETTINGS_BY_ENTITY_TYPE[entityType].type,
        settings: Object.assign({}, DEFAULT_ENTITY_SETTINGS_BY_ENTITY_TYPE[entityType].settings),
    };
}
//# sourceMappingURL=getDefaultEntitySettings.js.map