"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.sendTypingRequest = sendTypingRequest;
var _client = require("@xmpp/client");
function sendTypingRequest(client, chatId, fullName, start) {
  let id = start ? `typing-${Date.now()}` : `stop-typing-${Date.now()}`;
  const stanza = (0, _client.xml)('message', {
    type: 'groupchat',
    id: id,
    to: chatId
  }, (0, _client.xml)(start ? 'composing' : 'paused', {
    xmlns: 'http://jabber.org/protocol/chatstates'
  }), (0, _client.xml)('data', {
    fullName: fullName
  }));
  client.send(stanza);
}
//# sourceMappingURL=sendTypingRequest.xmpp.js.map