import{_ as t}from"./tslib.es6-d65164b3.js";import{c as e}from"./text-editor-3db5f940.js";import{h as s}from"./constants-da6cacac.js";import{C as i}from"./css-classes-1103f305.js";import{e as o}from"./custom-element-267f9a21.js";import"./single-slot-element-base-bbf951b4.js";import"./data-qa-utils-8be7c726.js";import"./const-90026e45.js";import"./dx-ui-element-b777832b.js";import"./lit-element-base-b20b52b2.js";import"./dx-license-e00a5bc7.js";import"./lit-element-462e7ad3.js";import"./logicaltreehelper-67db40f1.js";import"./layouthelper-67dd777a.js";import"./point-e4ec110e.js";import"./constants-7c047c0d.js";import"./property-4ec0b52d.js";import"./custom-events-helper-e7f279d3.js";import"./eventhelper-8bcec49f.js";import"./devices-17b9ba08.js";import"./dom-4684d8d6.js";import"./_commonjsHelpers-41cdd1e7.js";import"./string-2448bf95.js";import"./browser-3fc721b7.js";import"./focus-utils-1fc0087c.js";import"./key-a66127fc.js";import"./disposable-d2c2d283.js";class r{}r.Memo=i.Prefix+"-memo-edit";let n=class extends e{constructor(){super(),this.textAreaObserver=new MutationObserver(this.textAreaSizeChanged.bind(this))}connectedOrContentChanged(){super.connectedOrContentChanged();const t=this.getFieldElement();t&&this.textAreaObserver.observe(t,{attributes:!0})}disconnectedCallback(){this.textAreaObserver.disconnect(),super.disconnectedCallback()}textAreaSizeChanged(t,e){var s,i;const o=t[0].target,r=parseInt(o.style.width);if(!isNaN(r)){const t=this.offsetWidth-this.clientWidth+r;this.offsetWidth!==t&&(this.style.width=t+"px")}const n=parseInt(o.style.height);if(!isNaN(n)){const t=parseInt(getComputedStyle(o).minHeight),e=n>=t?n:t,r=null!==(i=null===(s=this.getButtonsArea())||void 0===s?void 0:s.getBoundingClientRect().height)&&void 0!==i?i:0,c=this.offsetHeight-this.clientHeight+e+r;this.offsetHeight!==c&&(this.style.height=c+"px")}}get shouldForceInputOnEnter(){return!1}getFieldElement(){return this.querySelector("textarea")}getButtonsArea(){return this.querySelector(".dxbl-memo-edit-buttons-area")}};n=t([o(s)],n);const c={loadModule:function(){}};export{n as DxMemoEditor,r as MemoCssClasses,c as default};
