Liferay.Loader.define("@liferay/object-web@1.0.108/js/components/DataValidation/ObjectValidationTabs",["module","exports","require","liferay!object-web$codemirror/mode/groovy/groovy","@frontend-taglib-clay$clayui/form","@liferay/object-js-components-web","liferay!frontend-js-react-web$react"],(function(e,a,t){var r;window;{Object.defineProperty(a,"__esModule",{value:!0}),a.BasicInfo=function({componentLabel:e,disabled:a,errors:t,setValues:r,values:d}){return o.default.createElement(o.default.Fragment,null,o.default.createElement(n.Card,{title:e},o.default.createElement(n.InputLocalized,{disabled:a,error:t.name,label:Liferay.Language.get("label"),onChange:e=>r({name:e}),placeholder:Liferay.Language.get("add-a-label"),required:!0,translations:d.name}),o.default.createElement(n.Input,{disabled:!0,label:Liferay.Language.get("type"),value:d.engineLabel}),o.default.createElement(l.ClayToggle,{disabled:a,label:Liferay.Language.get("active-validation"),onToggle:e=>r({active:e}),toggled:d.active})),o.default.createElement(i,{disabled:a,eventTypes:[Liferay.Language.get("on-submission")]}))},a.Conditions=function({disabled:e,errors:a,objectValidationRuleElements:t,setValues:r,values:l}){var i;const d=l.engine,u={content:Liferay.Language.get("use-the-expression-builder-to-define-the-format-of-a-valid-object-entry"),symbol:"question-circle-full"};let g;g="groovy"===d?Liferay.Language.get("insert-a-groovy-script-to-define-your-validation"):"ddm"===d?Liferay.Language.get("add-elements-from-the-sidebar-to-define-your-validation"):"";return o.default.createElement(o.default.Fragment,null,o.default.createElement(n.Card,{title:l.engineLabel,tooltip:"ddm"===d?u:null},o.default.createElement(n.CodeEditor,{error:a.script,mode:d,onChange:(e,a)=>r({lineCount:a,script:e}),placeholder:g,readOnly:e,sidebarElements:t,value:null!==(i=l.script)&&void 0!==i?i:""})),o.default.createElement(n.Card,{title:Liferay.Language.get("error-message")},o.default.createElement(n.InputLocalized,{disabled:e,error:a.errorLabel,label:Liferay.Language.get("message"),onChange:e=>r({errorLabel:e}),placeholder:Liferay.Language.get("add-an-error-message"),required:!0,translations:l.errorLabel})))},t("liferay!object-web$codemirror/mode/groovy/groovy");var l=t("@frontend-taglib-clay$clayui/form"),n=t("@liferay/object-js-components-web"),o=(r=t("liferay!frontend-js-react-web$react"))&&r.__esModule?r:{default:r};function i({disabled:e,eventTypes:a}){return o.default.createElement(n.Card,{title:Liferay.Language.get("trigger-event")},o.default.createElement(n.Select,{defaultValue:0,disabled:e,label:Liferay.Language.get("event"),options:a}))}}}));
//# sourceMappingURL=ObjectValidationTabs.js.map