Liferay.Loader.define("layout-admin-web@4.0.136/js/checkFriendlyURL", ['module', 'exports', 'require', 'frontend-js-web'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.checkFriendlyURL = checkFriendlyURL;

    var _frontendJsWeb = require("frontend-js-web");

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */

    /**
     * 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 checkFriendlyURL(getFriendlyURLWarningURL, formData) {
      return (0, _frontendJsWeb.fetch)(getFriendlyURLWarningURL, {
        body: formData,
        method: 'POST'
      }).then(function (response) {
        return response.json();
      }).then(function (json) {
        if (json.hasWarnings) {
          return {
            shouldSubmit: confirm(Liferay.Language.get(json.warningMessage))
          };
        }

        return {
          shouldSubmit: true
        };
      });
    }
    //# sourceMappingURL=checkFriendlyURL.js.map
  }
});
//# sourceMappingURL=checkFriendlyURL.js.map