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