"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.deriveUserRoleV2 = deriveUserRoleV2;
const channel_permission_1 = require("../channel-permission");
/**
 * Derives the user role for the given channel and user
 * @param channel an IChannel object
 * @param user  An IUser or IDiscussionUser object
 * @returns the appropriate Role for the given user relative to the given channel
 */
function deriveUserRoleV2(channel, user = {}) {
    const channelPermission = new channel_permission_1.ChannelPermission(channel);
    return channelPermission.deriveUserRole(user);
}
//# sourceMappingURL=derive-user-role-v2.js.map