Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.85/designer/js/definition-builder/diagram-builder/components/sidebar/sections/notifications/Role",["module","exports","require","liferay!frontend-js-react-web$react","../../../../DiagramBuilderContext","../shared-components/BaseRole"],(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=l();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 a=i?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")),a=n("../../../../DiagramBuilderContext"),o=(i=n("../shared-components/BaseRole"))&&i.__esModule?i:{default:i};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}var d=({notificationIndex:e})=>{var t,n,i,l,d,u,s,c;const{selectedItem:f,setSelectedItem:p}=(0,r.useContext)(a.DiagramBuilderContext);return r.default.createElement(o.default,{defaultFieldValue:{id:(null===(t=f.data.notifications)||void 0===t||null===(n=t.recipients)||void 0===n||null===(i=n[e])||void 0===i||null===(l=i.sectionsData)||void 0===l?void 0:l.id)||"",name:(null===(d=f.data.notifications)||void 0===d||null===(u=d.recipients)||void 0===u||null===(s=u[e])||void 0===s||null===(c=s.sectionsData)||void 0===c?void 0:c.name)||""},inputLabel:Liferay.Language.get("role-id"),selectLabel:Liferay.Language.get("role-name"),updateSelectedItem:t=>{p((n=>(n.data.notifications.recipients[e]={assignmentType:["roleId"],roleId:t.id,sectionsData:{id:t.id,name:t.name,roleType:t.roleType}},n)))}})};t.default=d}}));
//# sourceMappingURL=Role.js.map