'use strict';

var actioncable = require('@rails/actioncable');
var utils_general = require('./general.js');
require('../objectWithoutProperties-wSsbHFcG.js');
require('../slicedToArray-BcL7fKuL.js');
require('../unsupportedIterableToArray-BoHMiKNA.js');
require('../asyncToGenerator-8vhqAwJl.js');
require('../defineProperty-lChFfVqi.js');
require('../typeof-D4ZZ_FlZ.js');
require('i18next');
require('@bigbinary/neeto-cist');
require('@bigbinary/neetoui/Toastr');
require('qs');
require('ramda');

var getWebsocketURL = function getWebsocketURL() {
  var _document$querySelect;
  var websocketURL = (_document$querySelect = document.querySelector('meta[name="action-cable-url"]')) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.content;
  return utils_general.buildUrl(websocketURL, {
    subdomain: globalProps.organization.subdomain
  });
};
var consumer = actioncable.createConsumer(getWebsocketURL);
var createSubscription = function createSubscription(channelName, callbacks) {
  return consumer.subscriptions.create(channelName, callbacks);
};

exports.createSubscription = createSubscription;
//# sourceMappingURL=createSubscription.js.map
