Liferay.Loader.define("layout-admin-web@5.0.105/js/LayoutUtilityPageEntryDropdownPropsTransformer",["module","exports","require","frontend-js-web","./openDeleteLayoutModal"],(function(e,t,a){var r;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){let{actions:a,portletNamespace:r}=t;return l(l({},function(e,t){if(null==e)return{};var a,r,n=function(e,t){if(null==e)return{};var a,r,n={},i=Object.keys(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)a=i[r],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}(t,["actions","portletNamespace"])),{},{actions:null==a?void 0:a.map((t=>{var a;return l(l({},t),{},{items:null===(a=t.items)||void 0===a?void 0:a.map((t=>l(l({},t),{},{onClick(a){var n;const i=null===(n=t.data)||void 0===n?void 0:n.action;i&&(a.preventDefault(),e[i](t.data,r))}})))})})),portletNamespace:r})};var n=a("frontend-js-web"),i=(r=a("./openDeleteLayoutModal"))&&r.__esModule?r:{default:r};function o(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?o(Object(a),!0).forEach((function(t){u(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):o(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function u(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}const e={deleteLayoutUtilityPageEntry({deleteLayoutUtilityPageEntryMessage:e,deleteLayoutUtilityPageEntryURL:t}){(0,i.default)({message:e,onDelete:()=>{y(t)},title:Liferay.Language.get("utility-pages")})},markAsDefaultLayoutUtilityPageEntry({markAsDefaultLayoutUtilityPageEntryURL:e,message:t}){""!==t?(0,n.openConfirmModal)({message:Liferay.Language.get(t),onConfirm:t=>{t&&y(e)}}):y(e)},permissionsLayoutUtilityPageEntry({permissionsLayoutUtilityPageEntryURL:e}){(0,n.openModal)({title:Liferay.Language.get("permissions"),url:e})},renameLayoutUtilityPageEntry({layoutUtilityPageEntryId:e,layoutUtilityPageEntryName:t,updateLayoutUtilityPageEntryURL:a},r){(0,n.openSimpleInputModal)({dialogTitle:Liferay.Language.get("rename-utility-page"),formSubmitURL:a,idFieldName:"layoutUtilityPageEntryId",idFieldValue:e,mainFieldLabel:Liferay.Language.get("name"),mainFieldName:"name",mainFieldPlaceholder:Liferay.Language.get("name"),mainFieldValue:t,namespace:r})},unmarkAsDefaultLayoutUtilityPageEntry({unmarkAsDefaultLayoutUtilityPageEntryURL:e}){(0,n.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-unmark-this"),onConfirm:t=>{t&&y(e)}})}};function y(e){submitForm(document.hrefFm,e)}}}));
//# sourceMappingURL=LayoutUtilityPageEntryDropdownPropsTransformer.js.map