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