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