"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.canModifyChannel = canModifyChannel;
const platform_1 = require("../platform");
const is_authorized_to_modify_channel_by_legacy_permissions_1 = require("./is-authorized-to-modify-channel-by-legacy-permissions");
// NO V2 EQUIVALENT. Use canEditChannelV2 or canDeleteChannelV2
/**
 * Utility to determine if User has privileges to modify a channel
 * @deprecated use `canEditChannelV2` or `canDeleteChannelV2` instead.
 * @export
 * @param channel
 * @param user
 * @returns {boolean}
 */
function canModifyChannel(channel, user = {}) {
    if ((0, platform_1.isOrgAdminInOrg)(user, channel.orgId)) {
        return true;
    }
    return (0, is_authorized_to_modify_channel_by_legacy_permissions_1.isAuthorizedToModifyChannelByLegacyPermissions)(user, channel);
}
//# sourceMappingURL=can-modify-channel.js.map