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