Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.85/designer/js/definition-builder/diagram-builder/components/sidebar/sections/timers/select-action/ActionTypeAction",["module","exports","require","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../../../../source-builder/constants","../../../../../DiagramBuilderContext","../../shared-components/BaseActionsInfo"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;u(r("liferay!frontend-js-react-web$prop-types"));var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=c();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 i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),o=r("../../../../../../source-builder/constants"),i=r("../../../../../DiagramBuilderContext"),a=u(r("../../shared-components/BaseActionsInfo"));function c(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return c=function(){return e},e}function u(e){return e&&e.__esModule?e:{default: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 l(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){p(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 p(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const e=[{label:Liferay.Language.get("groovy"),value:"groovy"},{label:Liferay.Language.get("java"),value:"java"}];var f=({actionData:t,actionSectionsIndex:r,actionType:c,setActionSections:u})=>{var s;const{selectedItem:p}=(0,n.useContext)(i.DiagramBuilderContext),f="timerActions"===t.actionType?t:null,[d,y]=(0,n.useState)((null==f?void 0:f.script)||""),[b,g]=(0,n.useState)((null==f||null===(s=f.scriptLanguage)||void 0===s?void 0:s[r])||o.DEFAULT_LANGUAGE),[v,O]=(0,n.useState)((null==f?void 0:f.description)||""),[j,m]=(0,n.useState)((null==f?void 0:f.name)||""),[w,P]=(0,n.useState)((null==f?void 0:f.priority)||1);return n.default.createElement(a.default,{description:v,name:j,placeholderName:Liferay.Language.get("my-action"),placeholderScript:"${userName} sent you a ${entryType} for review in the workflow.",priority:w,script:d,scriptLanguage:b,scriptLanguageOptions:e,selectedItem:p,setDescription:O,setName:m,setPriority:P,setScript:y,setScriptLanguage:g,updateActionInfo:e=>{e.name&&e.script&&u((t=>{const n=[...t];return n[r]=l(l(l({},t[r]),e),{},{actionType:c}),n}))}})};t.default=f}}));
//# sourceMappingURL=ActionTypeAction.js.map