Liferay.Loader.define("commerce-frontend-js@4.0.52/utilities/modals/index",["module","exports","require","../eventsDefinitions","../notifications","./constants"],(function(i,e,o){window;Object.defineProperty(e,"__esModule",{value:!0}),e.resolveModalSize=function(i){const e=i.split("-")[1];if(!e)return r.CLAY_MODAL_SIZES_MAP.DEFAULT;if(e in r.CLAY_MODAL_SIZES_MAP)return r.CLAY_MODAL_SIZES_MAP[e];return r.CLAY_MODAL_SIZES_MAP.FULL_SCREEN},e.resolveModalHeight=function(i){return i&&i in r.MODAL_HEIGHT_MAP?r.MODAL_HEIGHT_MAP[i]:r.MODAL_HEIGHT_MAP.INITIAL},e.openPermissionsModal=function(i){Liferay.Util.openWindow({dialog:{destroyOnHide:!0},dialogIframe:{bodyCssClass:"dialog-with-footer"},title:Liferay.Language.get("permissions"),uri:i})},e.closeAndRedirect=function(i){const e=window.top.Liferay,o={successNotification:{message:Liferay.Language.get("your-request-completed-successfully"),showSuccessNotification:!0}};i&&(o.redirectURL=i.toString());e.fire(n.CLOSE_MODAL,o)},e.isSubmitting=function(){window.top.Liferay.fire(n.IS_LOADING_MODAL,{isLoading:!0})},e.onSubmitFail=function(i={}){const e=window.top.Liferay,{title:o=""}=i,r=o||Liferay.Language.get("an-unexpected-error-occurred");e.fire(n.IS_LOADING_MODAL,{isLoading:!1}),(0,t.showErrorNotification)(r)};var n=o("../eventsDefinitions"),t=o("../notifications"),r=o("./constants")}));
//# sourceMappingURL=index.js.map