Liferay.Loader.define("layout-template-admin-web@2.0.75/js/propsTransformers/LayoutPageTemplateEntryManagementToolbarPropsTransformer",["module","exports","require","frontend-js-web","../modal/openDeletePageTemplateModal"],(function(e,t,n){var r;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){let{portletNamespace:t}=e,n=function(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}(e,["portletNamespace"]);return i(i({},n),{},{onActionButtonClick(e,{item:n}){const r=null==n?void 0:n.data,a=null==r?void 0:r.action;"deleteLayoutPageTemplateEntries"===a?(0,o.default)({onDelete:()=>{const e=document.getElementById("".concat(t,"fm"));e&&submitForm(e)},title:Liferay.Language.get("page-template-sets")}):"exportLayoutPageTemplateEntries"===a&&(e=>{const n=document.getElementById("".concat(t,"fm"));n&&submitForm(n,null==e?void 0:e.exportLayoutPageTemplateEntryURL)})(r)},onCreationMenuItemClick(e,{item:n}){const r=null==n?void 0:n.data;"addLayoutPageTemplateEntry"===(null==r?void 0:r.action)&&(0,a.openSimpleInputModal)({dialogTitle:Liferay.Language.get("add-page-template"),formSubmitURL:null==r?void 0:r.addPageTemplateURL,mainFieldLabel:Liferay.Language.get("name"),mainFieldName:"name",mainFieldPlaceholder:Liferay.Language.get("name"),namespace:t})}})};var a=n("frontend-js-web"),o=(r=n("../modal/openDeletePageTemplateModal"))&&r.__esModule?r:{default:r};function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){u(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function u(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}}));
//# sourceMappingURL=LayoutPageTemplateEntryManagementToolbarPropsTransformer.js.map