Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.85/designer/js/definition-builder/diagram-builder/components/sidebar/sections/shared-components/BaseActionsInfo",["module","exports","require","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../utils"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=c(a("@frontend-taglib-clay$clayui/form")),l=u(a("@frontend-taglib-clay$clayui/icon")),n=(u(a("liferay!frontend-js-react-web$prop-types")),c(a("liferay!frontend-js-react-web$react"))),i=a("../utils");function u(e){return e&&e.__esModule?e:{default:e}}function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function c(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if(Object.prototype.hasOwnProperty.call(e,l)){var n=r?Object.getOwnPropertyDescriptor(e,l):null;n&&(n.get||n.set)?Object.defineProperty(a,l,n):a[l]=e[l]}return a.default=e,t&&t.set(e,a),a}var p=({description:e,executionType:t,executionTypeInput:a,executionTypeOptions:u,name:o,placeholderName:c,placeholderScript:p,priority:s,script:f,scriptLanguage:d,scriptLanguageOptions:g,setDescription:y,setExecutionType:m,setExecutionTypeOptions:b,setName:v,setPriority:E,setScript:L,setScriptLanguage:h,updateActionInfo:x})=>((0,n.useEffect)((()=>{if(u)return(0,i.sortElements)(u,"value"),function(){b(u.filter((({value:e})=>"onAssignment"!==e)))}}),[]),n.default.createElement(n.default.Fragment,null,n.default.createElement(r.default.Group,null,n.default.createElement("label",{htmlFor:"name"},Liferay.Language.get("name"),n.default.createElement("span",{className:"ml-1 mr-1 text-warning"},"*")),n.default.createElement(r.ClayInput,{id:"name",onBlur:()=>x({description:e,executionType:t,name:o,priority:s,script:f,scriptLanguage:d}),onChange:({target:e})=>{v(e.value)},placeholder:c,type:"text",value:o})),n.default.createElement(r.default.Group,null,n.default.createElement("label",{htmlFor:"description"},Liferay.Language.get("description")),n.default.createElement(r.ClayInput,{id:"description",onBlur:()=>x({description:e,executionType:t,name:o,priority:s,script:f,scriptLanguage:d}),onChange:({target:e})=>{y(e.value)},type:"text",value:e})),n.default.createElement(r.default.Group,null,n.default.createElement("label",{htmlFor:"script-language"},Liferay.Language.get("script-language")),n.default.createElement(r.ClaySelect,{"aria-label":"Select",defaultValue:d,id:"script-language",onChange:({target:e})=>{h(e.value)},onClickCapture:()=>x({description:e,executionType:t,name:o,priority:s,script:f,scriptLanguage:d})},g&&g.map((e=>n.default.createElement(r.ClaySelect.Option,{key:e.value,label:e.label,value:e.value}))))),n.default.createElement(r.default.Group,null,n.default.createElement("label",{htmlFor:"script"},Liferay.Language.get("script"),n.default.createElement("span",{className:"ml-1 mr-1 text-warning"},"*")),n.default.createElement(r.ClayInput,{component:"textarea",id:"script",onBlur:()=>x({description:e,executionType:t,name:o,priority:s,script:f,scriptLanguage:d}),onChange:({target:e})=>{L(e.value)},placeholder:p,type:"text",value:f})),void 0!==a&&n.default.createElement(r.default.Group,null,n.default.createElement("label",{htmlFor:"execution-type"},Liferay.Language.get("execution-type")),n.default.createElement(r.ClaySelect,{"aria-label":"Select",defaultValue:t,id:"execution-type",onChange:({target:e})=>{m(e.value)},onClickCapture:()=>x({description:e,executionType:t,name:o,priority:s,script:f,scriptLanguage:d})},u&&u.map((e=>n.default.createElement(r.ClaySelect.Option,{key:e.value,label:e.label,value:e.value}))))),n.default.createElement(r.default.Group,null,n.default.createElement("label",{htmlFor:"priority"},Liferay.Language.get("priority")),n.default.createElement("span",{className:"ml-1",title:Liferay.Language.get("lower-numbers-represent-higher-priority")},n.default.createElement(l.default,{className:"text-muted",symbol:"question-circle-full"})),n.default.createElement(r.ClayInput,{"aria-label":"Select",id:"priority",onBlur:({target:a})=>{const{value:r}=a;E(r),x({description:e,executionType:t,name:o,priority:s,script:f,scriptLanguage:d})},onChange:({target:e})=>{const{value:t}=e;E(t)},onWheel:e=>e.target.blur(),type:"number",value:s}))));t.default=p}}));
//# sourceMappingURL=BaseActionsInfo.js.map