import { createConsumer } from '@rails/actioncable';
import { buildUrl } from './general.js';
import '../objectWithoutProperties-DN7d1SzH.js';
import '../slicedToArray-DmsZvA_9.js';
import '../unsupportedIterableToArray-Dqz8Y8_I.js';
import '../asyncToGenerator-CPKhuIh2.js';
import '../defineProperty-Dcer7TUY.js';
import '../toPropertyKey-BAXkSB3z.js';
import '../typeof-D-UKOauR.js';
import 'i18next';
import '@bigbinary/neeto-cist';
import '@bigbinary/neetoui/Toastr';
import 'qs';
import '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 buildUrl(websocketURL, {
    subdomain: globalProps.organization.subdomain
  });
};
var consumer = createConsumer(getWebsocketURL);
var createSubscription = function createSubscription(channelName, callbacks) {
  return consumer.subscriptions.create(channelName, callbacks);
};

export { createSubscription };
//# sourceMappingURL=createSubscription.js.map
