Liferay.Loader.define("journal-web@5.0.100/js/DDMStructrureElementsDefaultPropsTransformer",["module","exports","require","frontend-js-web"],(function(e,r,t){window;{Object.defineProperty(r,"__esModule",{value:!0}),r.default=function(r){let{actions:t,items:n}=r,o=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||(o[t]=e[t]);return o}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(r,["actions","items"]);const u=r=>{const t=i(i({},r),{},{onClick(t){var n;const o=null===(n=r.data)||void 0===n?void 0:n.action;var i;o&&(t.preventDefault(),null===(i=e[o])||void 0===i||i.call(e,r.data))}});return Array.isArray(r.items)&&(t.items=r.items.map(u)),t};return i(i({},o),{},{actions:null==t?void 0:t.map(u),items:null==n?void 0:n.map(u)})};var n=t("frontend-js-web");function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function i(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?o(Object(t),!0).forEach((function(r){u(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}const e={deleteDDMStructure(e){(0,n.openConfirmModal)({message:Liferay.Language.get("are-you-sure-you-want-to-delete-this"),onConfirm:r=>r&&submitForm(document.hrefFm,e.deleteDDMStructureURL)})},importAndOverrideDDMStructure(e){Liferay.componentReady("".concat(e.portletNamespace,"importAndOverrideDataDefinitionModal")).then((r=>{r.open(e.importAndOverrideDDMStructureURL)}))},permissionsDDMStructure(e){(0,n.openModal)({title:Liferay.Language.get("permissions"),url:e.permissionsDDMStructureURL})}}}}));
//# sourceMappingURL=DDMStructrureElementsDefaultPropsTransformer.js.map