import{$a as c,$b as M,Bb as l,Ca as m,Cb as d,Cc as r,Ib as p,Kb as g,Lb as h,Pa as o,Yb as x,Zb as a,_b as y,eb as b,fc as T,gc as _,hc as C,pd as F,qb as v,sb as f,wc as s}from"./chunk-2SRK2U7X.js";import"./chunk-RMXJBC7V.js";function P(n,D){if(n&1&&(l(0,"label",2),y(1),d()),n&2){let t=h(),i=C(0);a(t.theme.components.TextField.label),p("htmlFor",t.inputId),o(),M(i)}}var S=(()=>{class n extends F{text=r.required();label=r.required();inputType=r.required();inputValue=s(()=>super.resolvePrimitive(this.text())||"");resolvedLabel=s(()=>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=m(n)))(e||n)}})();static \u0275cmp=c({type:n,selectors:[["a2ui-text-field"]],inputs:{text:[1,"text"],label:[1,"label"],inputType:[1,"inputType"]},features:[b],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&&(T(0),l(1,"section"),v(2,P,2,4,"label",0),l(3,"input",1),g("input",function(I){return e.handleInput(I)}),d()()),i&2){let u=_(e.resolvedLabel());o(),a(e.theme.components.TextField.container),o(),f(u?2:-1),o(),x(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{S as TextField};
