Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.85/designer/js/definition-builder/diagram-builder/components/sidebar/sections/timers/select-reassignment/Role",["module","exports","require","liferay!frontend-js-react-web$react","../../../../../../util/fetchUtil","../../../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=d();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("../../../../../../util/fetchUtil"),o=i(r("../../../SidebarPanel")),l=i(r("../../shared-components/BaseRole"));function i(e){return e&&e.__esModule?e:{default:e}}function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}var u=({actionData:e,actionSectionsIndex:t,setActionSections:r})=>((0,n.useEffect)((()=>{e.roleId&&!e.name&&(0,a.retrieveRolesBy)("roleId",e.roleId).then((e=>e.json())).then((e=>{r((r=>{const n=[...r];return n[t].name=e.name,n[t].roleType=e.roleType,n}))}))}),[]),n.default.createElement(o.default,{panelTitle:Liferay.Language.get("select-role")},n.default.createElement(l.default,{defaultFieldValue:{id:e.roleId||"",name:e.name||""},inputLabel:Liferay.Language.get("role-id"),selectLabel:Liferay.Language.get("role"),updateSelectedItem:e=>{r((r=>{const n=[...r];return n[t].assignmentType="roleId",n[t].roleId=e.id,n[t].name=e.name,n[t].roleType=e.roleType,n}))}})));t.default=u}}));
//# sourceMappingURL=Role.js.map