Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.115/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 a=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 r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var i=a?Object.getOwnPropertyDescriptor(e,n):null;i&&(i.get||i.set)?Object.defineProperty(r,n,i):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),n=r("../../../../../../util/fetchUtil"),i=_interopRequireDefault(r("../../../SidebarPanel")),l=_interopRequireDefault(r("../../shared-components/BaseRole"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}var _default=({actionData:e,actionSectionsIndex:t,setActionSections:r})=>((0,a.useEffect)((()=>{e.roleId&&!e.name&&(0,n.retrieveRoleById)(e.roleId).then((e=>e.json())).then((e=>{r((r=>{const a=[...r];return a[t].name=e.name,a[t].roleType=e.roleType,a}))}))}),[]),a.default.createElement(i.default,{panelTitle:Liferay.Language.get("select-role")},a.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 a=[...r];return a[t].assignmentType="roleId",a[t].roleId=e.id,a[t].name=e.name,a[t].roleType=e.roleType,a}))}})));t.default=_default}}));
//# sourceMappingURL=Role.js.map