Liferay.Loader.define("layout-set-prototype-web@5.0.30/js/LayoutSetPrototypeDropdownDefaultPropsTransformer",["module","exports","require","frontend-js-web"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){let{actions:r,items:o}=t,n=function(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}(t,["actions","items"]);const a=t=>{const r=i(i({},t),{},{onClick(r){var o;const n=null===(o=t.data)||void 0===o?void 0:o.action;var i;n&&(r.preventDefault(),null===(i=e[n])||void 0===i||i.call(e,t.data))}});return Array.isArray(t.items)&&(r.items=t.items.map(a)),r};return i(i({},n),{},{actions:null==r?void 0:r.map(a),items:null==o?void 0:o.map(a)})};var o=r("frontend-js-web");function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const e={activate(e){submitForm(document.hrefFm,e.activateURL)},deactivate(e){(0,o.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-deactivate-this"),onConfirm:t=>{t&&submitForm(document.hrefFm,e.deactivateURL)}})},delete(e){(0,o.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-delete-this"),onConfirm:t=>{t&&submitForm(document.hrefFm,e.deleteURL)}})},disablePropagation(e){submitForm(document.hrefFm,e.disablePropagationURL)},permissions(e){(0,o.openWindow)({dialog:{destroyOnHide:!0,modal:!0},dialogIframe:{bodyCssClass:"dialog-with-footer"},title:Liferay.Language.get("permissions"),uri:e.permissionsURL})},readyForPropagation(e){submitForm(document.hrefFm,e.readyForPropagationURL)}}}}));
//# sourceMappingURL=LayoutSetPrototypeDropdownDefaultPropsTransformer.js.map