'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.interactionTypeFetch = undefined;

var _Fetcher = require('../util/Fetcher');

var _Fetcher2 = _interopRequireDefault(_Fetcher);

var _callHandlers = require('./callHandlers');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var interactionTypeFetch = exports.interactionTypeFetch = function interactionTypeFetch() {
  var url = '/api/interaction_types';
  var fetcher = new _Fetcher2.default();

  return function (dispatch, getState) {
    return fetcher.get(url).then(function (interactionTypesData) {
      dispatch((0, _callHandlers.handleInteractionTypesResponse)(interactionTypesData));
    });
  };
};