import{B as z,e as b,m as M}from"./chunk-A32B57A4.js";import{l as S,s as E}from"./chunk-KADRYNDC.js";import{C as I,y as m}from"./chunk-Z5RJRCWC.js";import{Eb as s,Gd as v,Pb as d,Qb as h,Sa as r,Xa as u,gc as c,ta as a,ud as f,zc as p,zd as g}from"./chunk-JSJB5BKT.js";import{e as y}from"./chunk-SZAW6ZBW.js";var B,P,R=y(()=>{v();v();I();z();E();B=(()=>{class e{el;ngModel;control;cd;config;autoResize;variant="outlined";onResize=new r;filled;cachedScrollHeight;ngModelSubscription;ngControlSubscription;constructor(i,t,n,l,o){this.el=i,this.ngModel=t,this.control=n,this.cd=l,this.config=o}ngOnInit(){this.ngModel&&(this.ngModelSubscription=this.ngModel.valueChanges.subscribe(()=>{this.updateState()})),this.control&&(this.ngControlSubscription=this.control.valueChanges.subscribe(()=>{this.updateState()}))}ngAfterViewInit(){this.autoResize&&this.resize(),this.updateFilledState(),this.cd.detectChanges()}onInput(i){this.updateState()}updateFilledState(){this.filled=this.el.nativeElement.value&&this.el.nativeElement.value.length}resize(i){this.el.nativeElement.style.height="auto",this.el.nativeElement.style.height=this.el.nativeElement.scrollHeight+"px",parseFloat(this.el.nativeElement.style.height)>=parseFloat(this.el.nativeElement.style.maxHeight)?(this.el.nativeElement.style.overflowY="scroll",this.el.nativeElement.style.height=this.el.nativeElement.style.maxHeight):this.el.nativeElement.style.overflow="hidden",this.onResize.emit(i||{})}updateState(){this.updateFilledState(),this.autoResize&&this.resize()}ngOnDestroy(){this.ngModelSubscription&&this.ngModelSubscription.unsubscribe(),this.ngControlSubscription&&this.ngControlSubscription.unsubscribe()}static \u0275fac=function(t){return new(t||e)(s(u),s(M,8),s(b,8),s(f),s(S))};static \u0275dir=h({type:e,selectors:[["","pInputTextarea",""]],hostAttrs:[1,"p-inputtextarea","p-inputtext","p-component","p-element"],hostVars:6,hostBindings:function(t,n){t&1&&p("input",function(o){return n.onInput(o)}),t&2&&c("p-filled",n.filled)("p-inputtextarea-resizable",n.autoResize)("p-variant-filled",n.variant==="filled"||n.config.inputStyle()==="filled")},inputs:{autoResize:[2,"autoResize","autoResize",g],variant:"variant"},outputs:{onResize:"onResize"},standalone:!1})}return e})(),P=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=d({type:e});static \u0275inj=a({imports:[m]})}return e})()});export{B as a,P as b,R as c};
