"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = tooltipReducer;
exports.initialState = void 0;

var _Tooltip = _interopRequireDefault(require("./Tooltip.actionConstants"));

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

var initialState = {
  title: null,
  isHtmlTitle: false
};
exports.initialState = initialState;

function tooltipReducer(state, action) {
  switch (action.type) {
    case _Tooltip["default"].RESET:
      return initialState;

    case _Tooltip["default"].SET_TITLE:
      return Object.assign({}, state, action.data);
  }

  return state;
}