Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.115/designer/js/definition-builder/diagram-builder/components/shared-components/ScriptInput",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../source-builder/constants"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_interopRequireWildcard(a("@frontend-taglib-clay$clayui/form")),l=(function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(a("liferay!frontend-js-react-web$prop-types")),_interopRequireWildcard(a("liferay!frontend-js-react-web$react"))),n=a("../../../source-builder/constants");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}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 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}const e=[{label:Liferay.Language.get("groovy"),value:"groovy"},{label:Liferay.Language.get("java"),value:"java"}];var _default=({defaultScriptLanguage:t,handleClickCapture:a,inputValue:u,updateSelectedItem:i})=>{const[o,c]=(0,l.useState)(u),[d,f]=(0,l.useState)(t||n.DEFAULT_LANGUAGE);return l.default.createElement(l.default.Fragment,null,l.default.createElement("label",{htmlFor:"script-language"},Liferay.Language.get("script-language")),l.default.createElement(r.ClaySelect,{"aria-label":"Select",defaultValue:d,id:"script-language",onChange:({target:e})=>{f(e.value)},onClickCapture:()=>a(d)},e.map((e=>l.default.createElement(r.ClaySelect.Option,{key:e.value,label:e.label,value:e.value})))),l.default.createElement(r.default.Group,null,l.default.createElement("label",{htmlFor:"nodeScript"},Liferay.Language.get("script")),l.default.createElement(r.ClayInput,{component:"textarea",id:"nodeScript",onChange:e=>{i(e),c(e.target.value)},placeholder:'returnValue = "Transition Name";',type:"text",value:o})))};t.default=_default}}));
//# sourceMappingURL=ScriptInput.js.map