Liferay.Loader.define("dynamic-data-mapping-form-renderer@5.0.47/js/thunks/fieldBlur.es", ['module', 'exports', 'require', '../actions/eventTypes.es'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = fieldBlur;

    var _eventTypes = require("../actions/eventTypes.es");

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */
    function fieldBlur(_ref) {
      var activePage = _ref.activePage,
          focusDuration = _ref.focusDuration,
          formId = _ref.formId,
          properties = _ref.properties;
      return function (dispatch) {
        var _focusDuration$start;

        var fieldInstance = properties.fieldInstance;
        dispatch({
          payload: properties,
          type: _eventTypes.EVENT_TYPES.FIELD_BLUR
        });
        Liferay.fire('ddmFieldBlur', {
          fieldName: fieldInstance.fieldName,
          focusDuration: focusDuration.end - ((_focusDuration$start = focusDuration.start) !== null && _focusDuration$start !== void 0 ? _focusDuration$start : focusDuration.end),
          formId: formId,
          page: activePage
        });
      };
    }
    //# sourceMappingURL=fieldBlur.es.js.map
  }
});
//# sourceMappingURL=fieldBlur.es.js.map