Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.92/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){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();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")),r=n("../../../../DiagramBuilderContext"),o=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(n("./NotificationsInfo"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _extends(){return(_extends=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 _default=e=>{const{selectedItem:t}=(0,i.useContext)(r.DiagramBuilderContext),{notifications:n}=null==t?void 0:t.data,[a,c]=(0,i.useState)([{identifier:"".concat(Date.now(),"-0")}]);return(0,i.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)}}),[]),a.map((({identifier:t},n)=>i.default.createElement(o.default,_extends({},e,{identifier:t,index:n,key:"section-".concat(t),sectionsLength:null==a?void 0:a.length,setSections:c}))))};t.default=_default}}));
//# sourceMappingURL=Notifications.js.map