Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.84/admin/js/components/FormInfo.es",["module","exports","require","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/layout","data-engine-js-components-web","frontend-js-web","liferay!frontend-js-react-web$react","../eventTypes.es","../util/dom"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.FormInfo=function(){var t,n;const{portletNamespace:c}=(0,o.useConfig)(),{defaultLanguageId:d,editingLanguageId:f,localizedDescription:s,localizedName:m}=(0,o.useFormState)(),p=(0,o.useForm)(),y=(0,i.useRef)(null),g=(0,i.useRef)(null);return(0,i.useEffect)((()=>{y.current&&g.current&&(new l.autoSize(y.current),new l.autoSize(g.current))}),[]),i.default.createElement("div",{className:"ddm-form-basic-info"},i.default.createElement(a.default.ContainerFluid,{size:"xl"},i.default.createElement("h1",null,i.default.createElement(r.default.Group,null,i.default.createElement("textarea",{className:"ddm-form-name form-control",id:"nameEditor",name:"".concat(c,"nameEditor"),onChange:e=>p({payload:e.target.value,type:u.EVENT_TYPES.FORM_INFO.NAME_CHANGE}),onKeyDown:t=>{const n=t.which?t.which:t.keyCode;e(t,120)&&91!==Number(n)&&t.preventDefault()},placeholder:Liferay.Language.get("untitled-form"),ref:y,style:{height:"100px"},value:null!==(t=m[f])&&void 0!==t?t:m[d]}))),i.default.createElement("h5",null,i.default.createElement(r.default.Group,null,i.default.createElement("textarea",{className:"ddm-form-description form-control",id:"descriptionEditor",name:"".concat(c,"descriptionEditor"),onChange:e=>p({payload:e.target.value,type:u.EVENT_TYPES.FORM_INFO.DESCRIPTION_CHANGE}),placeholder:Liferay.Language.get("add-a-short-description-for-this-form"),ref:g,style:{height:"24px"},value:null!==(n=s[f])&&void 0!==n?n:s[d]})))))};var r=f(n("@frontend-taglib-clay$clayui/form")),a=f(n("@frontend-taglib-clay$clayui/layout")),o=n("data-engine-js-components-web"),l=n("frontend-js-web"),i=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=d();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")),u=n("../eventTypes.es"),c=n("../util/dom");function d(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return d=function(){return e},e}function f(e){return e&&e.__esModule?e:{default:e}}const e=(e,t)=>{const n=e.which?e.which:e.keyCode;let r=!1;return e.target.innerText.length>=t&&(0,c.isModifyingKey)(n)&&!(0,c.isKeyInSet)(n,["BACKSPACE","DELETE","ESC","ENTER"])&&(r=!0),r}}}));
//# sourceMappingURL=FormInfo.es.js.map