Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.85/designer/js/definition-builder/diagram-builder/components/sidebar/sections/actions/Actions",["module","exports","require","liferay!frontend-js-react-web$react","../../../../DiagramBuilderContext","./ActionsInfo"],(function(e,t,r){var n;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var o=n?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(r,i,o):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),o=r("../../../../DiagramBuilderContext"),a=(n=r("./ActionsInfo"))&&n.__esModule?n:{default:n};function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}var u=e=>{const{selectedItem:t}=(0,i.useContext)(o.DiagramBuilderContext),{actions:r}=null==t?void 0:t.data,[n,c]=(0,i.useState)([{identifier:"".concat(Date.now(),"-0")}]);return(0,i.useEffect)((()=>{const e=[];if(r){for(let t=0;t<r.name.length;t++)e.push({description:r.description[t],executionType:r.executionType[t],identifier:"".concat(Date.now(),"-").concat(t),name:r.name[t],priority:r.priority[t],script:r.script[t]});c(e)}}),[]),n.map((({identifier:t},r)=>i.default.createElement(a.default,f({},e,{identifier:t,index:r,key:"section-".concat(t),sectionsLength:null==n?void 0:n.length,setSections:c}))))};t.default=u}}));
//# sourceMappingURL=Actions.js.map