'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.callbacksCompleteForCall = exports.errorCallFor = exports.successCallFor = exports.startCallFor = undefined;

var _constants = require('../../constants');

var callAction = function callAction(callStatus, type) {
  return {
    type: _constants.CALL_STATUS,
    payload: {
      call: type,
      status: callStatus
    }
  };
};

var startCallFor = exports.startCallFor = function startCallFor(type) {
  return callAction('calling', type);
};
var successCallFor = exports.successCallFor = function successCallFor(type) {
  return callAction('success', type);
};
var errorCallFor = exports.errorCallFor = function errorCallFor(type) {
  return callAction('error', type);
};

var callbacksCompleteForCall = exports.callbacksCompleteForCall = function callbacksCompleteForCall(type) {
  return {
    type: _constants.SET_CALLBACKS_STATUS,
    payload: {
      call: type,
      status: 'complete'
    }
  };
};