Liferay.Loader.define("frontend-taglib-clay@6.6.20/data_set_display/utilities/modals/index", ['module', 'exports', 'require', 'frontend-js-web', './constants'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.resolveModalSize = resolveModalSize;
    exports.resolveModalHeight = resolveModalHeight;
    exports.openPermissionsModal = openPermissionsModal;

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

    var _constants = require("./constants");

    /**
     * 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
     */
    function resolveModalSize(modalTarget) {
      var modalSize = modalTarget.split('-')[1];

      if (!modalSize) {
        return _constants.CLAY_MODAL_SIZES_MAP.DEFAULT;
      }

      if (modalSize in _constants.CLAY_MODAL_SIZES_MAP) {
        return _constants.CLAY_MODAL_SIZES_MAP[modalSize];
      }

      return _constants.CLAY_MODAL_SIZES_MAP.FULL_SCREEN;
    }

    function resolveModalHeight(size) {
      return !size || !(size in _constants.MODAL_HEIGHT_MAP) ? _constants.MODAL_HEIGHT_MAP.INITIAL : _constants.MODAL_HEIGHT_MAP[size];
    }

    function openPermissionsModal(url) {
      (0, _frontendJsWeb.openModal)({
        title: Liferay.Language.get('permissions'),
        url: url
      });
    }
    //# sourceMappingURL=index.js.map
  }
});
//# sourceMappingURL=index.js.map