Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.85/designer/js/definition-builder/diagram-builder/components/sidebar/sections/assignments/select-assignment/Role",["module","exports","require","liferay!frontend-js-react-web$react","../../../../../DiagramBuilderContext","../../../SidebarPanel","../../shared-components/BaseRole"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=u();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=n?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(r,a,o):r[a]=e[a]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),a=r("../../../../../DiagramBuilderContext"),o=l(r("../../../SidebarPanel")),i=l(r("../../shared-components/BaseRole"));function l(e){return e&&e.__esModule?e:{default:e}}function u(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return u=function(){return e},e}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var f=()=>{var e,t,r,l;const{selectedItem:u,setSelectedItem:s}=(0,n.useContext)(a.DiagramBuilderContext);return n.default.createElement(o.default,{panelTitle:Liferay.Language.get("select-role")},n.default.createElement(i.default,{defaultFieldValue:{id:(null===(e=u.data.assignments)||void 0===e||null===(t=e.sectionsData)||void 0===t?void 0:t.id)||"",name:(null===(r=u.data.assignments)||void 0===r||null===(l=r.sectionsData)||void 0===l?void 0:l.name)||""},inputLabel:Liferay.Language.get("role-id"),selectLabel:Liferay.Language.get("role"),updateSelectedItem:e=>{s((t=>d(d({},t),{},{data:d(d({},t.data),{},{assignments:{assignmentType:["roleId"],roleId:e.id,sectionsData:{id:e.id,name:e.name,roleType:e.roleType}}})})))}}))};t.default=f}}));
//# sourceMappingURL=Role.js.map