"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = StateHandler;

function StateHandler() {
  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  var action = arguments.length > 1 ? arguments[1] : undefined;
  var data = action.data;

  switch (action.type) {
    case action.type:
      return Object.assign({}, state, {
        data: data
      });
  }
}