Liferay.Loader.define("@liferay/search-experiences-web@3.0.7/sxp_blueprint_admin/js/shared/sxp_element/JSONInput",["module","exports","require","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../CodeMirrorEditor"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=u(r("liferay!frontend-js-react-web$classnames")),n=function(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 r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=a?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(r,n,l):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react")),l=u(r("../CodeMirrorEditor"));function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function u(e){return e&&e.__esModule?e:{default:e}}var f=function({autocompleteSchema:e,disabled:t,value:r,label:o=Liferay.Language.get("json[stands-for]"),nullable:u,readOnly:f=!1,required:i=!0,name:d,setFieldValue:s,setFieldTouched:c}){const[p,y]=(0,n.useState)(r);return(0,n.useEffect)((()=>{s(d,p)}),[p,d,s]),n.default.createElement("div",{className:(0,a.default)("custom-json",{disabled:t}),onBlur:()=>c(d)},n.default.createElement("label",null,o,(!i||u)&&n.default.createElement("span",{className:"optional-text"},Liferay.Language.get("optional"))),n.default.createElement(l.default,{autocompleteSchema:e,onChange:y,readOnly:f,value:p}))};t.default=f}}));
//# sourceMappingURL=JSONInput.js.map