"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createPrivateRoom = createPrivateRoom;
var _createRoomPresence = require("./createRoomPresence.xmpp");
var _setMeAsOwner = require("./setMeAsOwner.xmpp");
var _roomConfig = require("./roomConfig.xmpp");
var _PLATFORM_CONSTANTS = require("../../helpers/constants/PLATFORM_CONSTANTS");
async function createPrivateRoom(title, description, to, client) {
  console.log(title, description, to);
  const roomHash = to;
  const roomId = `${roomHash}${_PLATFORM_CONSTANTS.CONFERENCE_DOMAIN}`;
  try {
    await (0, _createRoomPresence.createRoomPresence)(roomId, client);
    await (0, _setMeAsOwner.setMeAsOwner)(roomId, client);
    await (0, _roomConfig.roomConfig)(roomId, title, description, client);
  } catch (error) {
    console.log(error);
  }
  return roomId;
}
//# sourceMappingURL=createPrivateRoom.xmpp.js.map