text: 'use strict';
  
  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.getOperation = getOperation;
  exports.validateParams = validateParams;
  exports.getURL = getURL;
  exports.getRequestTimeout = getRequestTimeout;
  exports.isAuthSupported = isAuthSupported;
  exports.prepareParams = prepareParams;
  exports.handleResponse = handleResponse;
  
  var _flow_interfaces = require('../../flow_interfaces');
  
  var _operations = require('../../constants/operations');
  
  var _operations2 = _interopRequireDefault(_operations);
  
  var _utils = require('../../utils');
  
  var _utils2 = _interopRequireDefault(_utils);
  
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  
  function getOperation() {
    return _operations2.default.PNUnsubscribeOperation;
  }
  
  function validateParams(modules) {
    var config = modules.config;
  
  
    if (!config.subscribeKey) return 'Missing Subscribe Key';
  }
  
  function getURL(modules, incomingParams) {
    var config = modules.config;
    var _incomingParams$chann = incomingParams.channels,
        channels = _incomingParams$chann === undefined ? [] : _incomingParams$chann;
  
    var stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';
    return '/v2/presence/sub-key/' + config.subscribeKey + '/channel/' + _utils2.default.encodeString(stringifiedChannels) + '/leave';
  }
  
  function getRequestTimeout(_ref) {
    var config = _ref.config;
  
    return config.getTransactionTimeout();
  }
  
  function isAuthSupported() {
    return true;
  }
  
  function prepareParams(modules, incomingParams) {
    var _incomingParams$chann2 = incomingParams.channelGroups,
        channelGroups = _incomingParams$chann2 === undefined ? [] : _incomingParams$chann2;
  
    var params = {};
  
    if (channelGroups.length > 0) {
      params['channel-group'] = channelGroups.join(',');
    }
  
    return params;
  }
  
  function handleResponse() {
    return {};
  }
  //# sourceMappingURL=leave.js.map
  