"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var MessageType_1 = require("../support/MessageType");
var EventType_1 = require("./EventType");
var EventFactory = /** @class */ (function () {
    function EventFactory(channelId) {
        this.channelId = channelId;
    }
    EventFactory.prototype.getRatingEvent = function (nodeToBeRated, score, attributes) {
        var eventType = EventType_1.EventType.withChannelId(EventType_1.EventType.PUBLISH, this.channelId);
        var payload = Object.assign(nodeToBeRated, { score: score });
        var type = MessageType_1.MessageType.RATING;
        var eventPayload = { attributes: attributes, type: type, payload: payload };
        return { type: eventType, payload: eventPayload };
    };
    return EventFactory;
}());
exports.EventFactory = EventFactory;
//# sourceMappingURL=EventFactory.js.map