Liferay.Loader.define('commerce-bom-admin-web@4.0.30/js/actions/app.es', ['module', 'exports', 'require'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = exports.actions = exports.actionDefinition = void 0;

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * The contents of this file are subject to the terms of the Liferay Enterprise
     * Subscription License ("License"). You may not use this file except in
     * compliance with the License. You can obtain a copy of the License by
     * contacting Liferay, Inc. See the License for the specific language governing
     * permissions and limitations under the License, including but not limited to
     * distribution rights of the Software.
     */
    var actionDefinition = {
      INITIALIZE_APP_DATA: 'initializeAppData',
      SET_ERROR: 'setError',
      SET_LOADING: 'setLoading',
      SET_SPRITEMAP: 'setSpritemap',
      UPDATE_BREADCRUMBS: 'updateBreadcrumbs'
    };
    exports.actionDefinition = actionDefinition;

    var initializeAppData = function initializeAppData(dispatch) {
      return function (data) {
        return dispatch({
          payload: {
            areaApiUrl: data.areaApiUrl,
            areaId: data.areaId,
            productApiUrl: data.productApiUrl,
            spritemap: data.spritemap
          },
          type: actionDefinition.INITIALIZE_APP_DATA
        });
      };
    };

    var setError = function setError(dispatch) {
      return function (error) {
        return dispatch({
          payload: error,
          type: actionDefinition.SET_ERROR
        });
      };
    };

    var setLoading = function setLoading(dispatch) {
      return function (loading) {
        return dispatch({
          payload: loading,
          type: actionDefinition.SET_LOADING
        });
      };
    };

    var setSpritemap = function setSpritemap(dispatch) {
      return function (spritemap) {
        return dispatch({
          payload: spritemap,
          type: actionDefinition.SET_SPRITEMAP
        });
      };
    };

    var actions = {
      initializeAppData: initializeAppData,
      setError: setError,
      setLoading: setLoading,
      setSpritemap: setSpritemap
    };
    exports.actions = actions;
    var _default = actions;
    exports.default = _default;
    //# sourceMappingURL=app.es.js.map
  }
});
//# sourceMappingURL=app.es.js.map