import{ag as e,x as t,_ as a,c as i,ah as s,ai as h,h as r,m as l}from"./backend-ai-console-125e4b92.js";let n=class extends s{connectedCallback(){super.connectedCallback(),this.setAttribute("aria-multiline","true")}firstUpdated(e){super.firstUpdated(e),this.refreshHeight()}onInput(e){super.onInput(e),this.refreshHeight()}refreshHeight(){h(this)||requestAnimationFrame((()=>{this.setHeight(1);const e=this.$formElement.scrollHeight;this.setHeight(e)}))}setHeight(e){this.$formElement.style.setProperty("--_textarea-height",""+(null==e?"":e+"px"))}renderFormElement(){return r` <textarea id="${this.formElementId}" .value="${this.value}" ?required="${this.required}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" aria-label="${l(this.label)}" name="${l(this.name)}" pattern="${l(this.pattern)}" autocomplete="${l(this.autocomplete)}" minlength="${l(this.minLength)}" maxlength="${l(this.maxLength)}" rows="1" tabindex="${this.disabled?-1:0}">
${this.initialValue||""}</textarea> `}};n.styles=[...e.styles,t("::slotted(textarea){height:var(--textarea-height,var(--_textarea-height));min-height:var(--textarea-min-height,var(--textarea-height,var(--_textarea-height)));max-height:var(--textarea-max-height);resize:var(--textarea-resize,none)}:host(:focus) ::slotted(textarea),:host(:hover) ::slotted(textarea){will-change:height}")],n=a([i("wl-textarea")],n);
