"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.sendMessageReaction = sendMessageReaction;
var _client = require("@xmpp/client");
function sendMessageReaction(client, messageId, roomJid, reactionsList, data, reactionSymbol) {
  const id = `message-reaction:${Date.now().toString()}`;
  const dataReaction = {
    senderFirstName: data.firstName,
    senderLastName: data.lastName
  };
  const message = (0, _client.xml)('message', {
    id: id,
    type: 'groupchat',
    from: client.jid?.toString(),
    to: roomJid
  }, (0, _client.xml)('reactions', {
    id: messageId,
    from: client.jid?.toString(),
    xmlns: 'urn:xmpp:reactions:0'
  }, ...reactionsList.map(reaction => (0, _client.xml)('reaction', {}, reaction ?? ''))
  // xml('reaction', {}, reactionSymbol ?? '👋'),
  ), (0, _client.xml)('data', dataReaction), (0, _client.xml)('store', {
    xmlns: 'urn:xmpp:hints'
  }));
  client.send(message);
}
//# sourceMappingURL=sendMessageReaction.xmpp.js.map