import{$b as C,Bb as l,Bc as r,Cb as s,Da as b,Hb as x,Ib as p,Kb as y,Lb as M,Qa as o,Yb as _,Zb as a,_b as T,ab as g,eb as v,gc as F,hc as I,ic as P,md as D,na as m,oa as c,qb as f,sb as h,vc as u}from"./chunk-RGCH6K7F.js";import"./chunk-W7GRJBO5.js";function E(n,O){if(n&1&&(l(0,"label",2),T(1),s()),n&2){let t=M(),i=P(0);a(t.theme.components.TextField.label),p("htmlFor",t.inputId),o(),C(i)}}var k=(()=>{class n extends D{text=r.required();label=r.required();inputType=r.required();inputValue=u(()=>super.resolvePrimitive(this.text())||"");resolvedLabel=u(()=>super.resolvePrimitive(this.label()));inputId=super.getUniqueId("a2ui-input");handleInput(t){let i=this.text()?.path;!(t.target instanceof HTMLInputElement)||!i||this.processor.setData(this.component(),i,t.target.value,this.surfaceId())}static \u0275fac=(()=>{let t;return function(e){return(t||(t=b(n)))(e||n)}})();static \u0275cmp=g({type:n,selectors:[["a2ui-text-field"]],inputs:{text:[1,"text"],label:[1,"label"],inputType:[1,"inputType"]},features:[v],decls:4,vars:11,consts:[[3,"for","class"],["autocomplete","off","placeholder","Please enter a value",3,"input","id","value","type"],[3,"for"]],template:function(i,e){if(i&1){let d=x();F(0),l(1,"section"),f(2,E,2,4,"label",0),l(3,"input",1),y("input",function(L){return m(d),c(e.handleInput(L))}),s()()}if(i&2){let d=I(e.resolvedLabel());o(),a(e.theme.components.TextField.container),o(),h(d?2:-1),o(),_(e.theme.additionalStyles==null?null:e.theme.additionalStyles.TextField),a(e.theme.components.TextField.element),p("id",e.inputId)("value",e.inputValue())("type",e.inputType()==="number"?"number":"text")}},styles:["[_nghost-%COMP%]{display:flex;flex:var(--weight)}section[_ngcontent-%COMP%], input[_ngcontent-%COMP%], label[_ngcontent-%COMP%]{box-sizing:border-box}input[_ngcontent-%COMP%]{display:block;width:100%}label[_ngcontent-%COMP%]{display:block;margin-bottom:4px}"]})}return n})();export{k as TextField};
