Liferay.Loader.define("@liferay/document-library-web@6.0.104/document_library/js/saveDDMStructure.es",["module","exports","require"],(function(e,t,r){window;{function n(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 a(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){i(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 i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){const r=Liferay.component("".concat(e).concat(t)),n={};if(r){r.get("translatedLanguages").values().forEach((e=>{n[e]=r.getValue(e)}))}return n}function c({dataLayoutBuilder:e,namespace:t}){const{dataDefinition:r,dataLayout:n}=e.current.state,i=o(t,"name"),c=o(t,"description");return{dataDefinition:JSON.stringify(a(a({},r.serialize()),{},{description:c,name:i})),dataLayout:JSON.stringify(a(a({},n.serialize()),{},{description:c,name:i}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.getInputLocalizedValues=o,t.getDataEngineStructure=c,t.default=function({namespace:e}){const t=document["".concat(e,"fm")];t.addEventListener("submit",(async r=>{r.preventDefault();const n=await Liferay.componentReady("".concat(e,"dataLayoutBuilder"));Liferay.Util.postForm(t,{data:c({dataLayoutBuilder:n,namespace:e})})}),!0)}}}));
//# sourceMappingURL=saveDDMStructure.es.js.map