"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
exports.fontsReducer = fontsReducer;
var _Actions = require("./Actions");
var initialState = [];
function fontsReducer() {
  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
  var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  switch (action.type) {
    case _Actions.RECEIVE_FONTS:
      return action.data;
    case _Actions.ADD_FONT:
      {
        var customFont = action.data;
        return state.concat(customFont);
      }
    case _Actions.ADD_FONTS:
      {
        var customFonts = action.data;
        return state.concat(customFonts);
      }
    default:
      return state;
  }
}
var _default = exports["default"] = fontsReducer;