import { ChannelPermission } from "../channel-permission";
import { hasOrgAdminDeleteRights } from "../portal-privilege";
/**
 * Utility to determine if User has privileges to delete a channel
 * @export
 * @param channel
 * @param user
 * @returns {boolean}
 */
export function canDeleteChannelV2(channel, user = {}) {
    if (hasOrgAdminDeleteRights(user, channel.orgId)) {
        return true;
    }
    const channelPermission = new ChannelPermission(channel);
    return channelPermission.canDeleteChannel(user);
}
//# sourceMappingURL=can-delete-channel-v2.js.map