import{n,w as s}from"./index-BvWOSbaR.js";import{v as r}from"./auto-complete-BsG3RQJ3-DBhjeNry.js";import{a as h,v as l,b as d}from"./max-length-behavior-BmNWss6T-CVMdbfRd.js";import{v as p}from"./placeholder-6URRds0_-DWDJBUlt.js";import{v as c}from"./read-only-CcRldJ9w-C2Qe6n6h.js";import{v as m}from"./required-G86n77y0-D5tQZzju.js";import{a as v}from"./controller-icon-DN63N3Rm-TTy6vTmy.js";/*!
 * KoliBri - The accessible HTML-Standard
 */const u=(a,t,e={})=>{n(a,"_pattern",t,e)},o=["default","visibility-toggle"],_=(a,t)=>{s(a,"_variant",e=>typeof e=="string"&&o.includes(e),new Set(o),t)};class V extends v{constructor(t,e,i){super(t,e,i),this.afterSyncCharCounter=()=>{typeof this.component._value=="string"&&(this.component.state._currentLength=this.component._value.length,this.updateCurrentLengthDebounced(this.component._value.length))},this.component=t}validateAutoComplete(t){r(this.component,t)}validateHasCounter(t){h(this.component,t)}validateMaxLengthBehavior(t){l(this.component,t)}validateVariant(t){_(this.component,t)}validateMaxLength(t){d(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePattern(t){u(this.component,t)}validatePlaceholder(t){p(this.component,t)}validateReadOnly(t){c(this.component,t)}validateRequired(t){m(this.component,t)}validateValue(t){n(this.component,"_value",t,{hooks:{afterPatch:this.afterSyncCharCounter}}),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),this.validateMaxLengthBehavior(this.component._maxLengthBehavior),this.validateMaxLength(this.component._maxLength),this.validatePattern(this.component._pattern),this.validatePlaceholder(this.component._placeholder),this.validateReadOnly(this.component._readOnly),this.validateRequired(this.component._required),this.validateValue(this.component._value),this.validateVariant(this.component._variant)}}export{V as I};
//# sourceMappingURL=controller-CeGWU1Au-DNFef5aJ.js.map
