Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.85/designer/js/definition-builder/diagram-builder/components/sidebar/sections/notifications/RoleType",["module","exports","require","liferay!frontend-js-react-web$react","../../../../DiagramBuilderContext","../shared-components/BaseRoleType"],(function(e,t,r){var n;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=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 r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=n?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),a=r("../../../../DiagramBuilderContext"),i=(n=r("../shared-components/BaseRoleType"))&&n.__esModule?n:{default:n};function l(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return l=function(){return e},e}function u(){return(u=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)}function f(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var c=e=>{let{notificationIndex:t,updateSelectedItem:r}=e,n=f(e,["notificationIndex","updateSelectedItem"]);const{setSelectedItem:l}=(0,o.useContext)(a.DiagramBuilderContext);return o.default.createElement(i.default,u({buttonName:Liferay.Language.get("new-role-type"),inputLabel:Liferay.Language.get("role-type"),notificationIndex:t,updateSelectedItem:e=>{l((r=>(r.data.notifications.recipients[t]={assignmentType:["roleType"],autoCreate:e.map((({autoCreate:e})=>e)),roleName:e.map((({roleName:e})=>e)),roleType:e.map((({roleType:e})=>e))},r)))}},n))};t.default=c}}));
//# sourceMappingURL=RoleType.js.map