Liferay.Loader.define("layout-template-admin-web@2.0.75/js/ActionsComponentPropsTransformer",["module","exports","require","frontend-js-web","./modal/openDeletePageTemplateModal"],(function(e,t,o){var n;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(t){let{additionalProps:{deleteLayoutPageTemplateCollectionURL:o,viewLayoutPageTemplateCollectionURL:n},items:r,portletNamespace:l}=t;return i(i({},function(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o,n,r={},l=Object.keys(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||(r[o]=e[o]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}(t,["additionalProps","items","portletNamespace"])),{},{items:r.map((t=>i(i({},t),{},{onClick(r){var a;const i=null===(a=t.data)||void 0===a?void 0:a.action;i&&(r.preventDefault(),e[i]({deleteLayoutPageTemplateCollectionURL:o,portletNamespace:l,viewLayoutPageTemplateCollectionURL:n}))}})))})};var r=o("frontend-js-web"),l=(n=o("./modal/openDeletePageTemplateModal"))&&n.__esModule?n:{default:n};function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function i(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){c(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function c(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const e={deleteCollections({deleteLayoutPageTemplateCollectionURL:e,portletNamespace:t,viewLayoutPageTemplateCollectionURL:o}){const n=document.createElement("form");n.setAttribute("method","post"),(0,r.openSelectionModal)({buttonAddLabel:Liferay.Language.get("delete"),multiple:!0,onSelect:o=>{o&&(0,l.default)({onDelete:()=>{const r=document.createElement("input");r.name="".concat(t,"rowIds"),r.value=o.map((e=>e.value)),n.appendChild(r),submitForm(n,e)},title:Liferay.Language.get("page-template-sets")})},selectEventName:"".concat(t,"selectCollections"),title:Liferay.Language.get("delete-collection"),url:o})}}}}));
//# sourceMappingURL=ActionsComponentPropsTransformer.js.map