"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.canEditPostStatusV2 = canEditPostStatusV2;
const channel_permission_1 = require("../channel-permission");
const portal_privilege_1 = require("../portal-privilege");
/**
 * Utility to determine if User has privileges to modify the status of a post
 * @param channel
 * @param user
 * @returns {boolean}
 */
function canEditPostStatusV2(channel, user = {}) {
    if ((0, portal_privilege_1.hasOrgAdminUpdateRights)(user, channel.orgId)) {
        return true;
    }
    const channelPermission = new channel_permission_1.ChannelPermission(channel);
    return channelPermission.canModerateChannel(user);
}
//# sourceMappingURL=can-edit-post-status-v2.js.map