Liferay.Loader.define("layout-content-page-editor-web@2.0.110/page_editor/app/components/fragment-content/getEditableElement", ['module', 'exports', 'require', 'frontend-js-metal-web$metal-dom'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.getEditableElement = getEditableElement;

    var _metalDom = require("frontend-js-metal-web$metal-dom");

    /**
     * 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 getEditableElement(target) {
      var editableElement = (0, _metalDom.closest)(target, 'lfr-editable');

      if (!editableElement) {
        editableElement = (0, _metalDom.closest)(target, '[data-lfr-editable-id]');
      }

      if (!editableElement) {
        editableElement = (0, _metalDom.closest)(target, '[data-lfr-background-image-id]');
      }

      return editableElement;
    }
    //# sourceMappingURL=getEditableElement.js.map
  }
});
//# sourceMappingURL=getEditableElement.js.map