"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isModerator = void 0;
var _constants = require("../../core/constants");
const {
  COMMUNITY_MODERATOR,
  CHANNEL_MODERATOR,
  MODERATOR,
  SUPER_MODERATOR
} = _constants.MemberRoles;
const isModerator = userRoles => {
  if (!(userRoles !== null && userRoles !== void 0 && userRoles.length)) {
    return false;
  }
  const roles = [COMMUNITY_MODERATOR, CHANNEL_MODERATOR, MODERATOR, SUPER_MODERATOR];
  return userRoles.some(role => roles.includes(role));
};
exports.isModerator = isModerator;
//# sourceMappingURL=isModerator.js.map