import{z as h,n as a,m as n,w as r}from"./index-yJ8X--q8.js";import{v as l}from"./auto-complete-DTSb0_Qv-C0sxgmJi.js";import{a as p,v as c}from"./max-length-behavior-Dz2KB_23-Dzkr52ll.js";import{a as d}from"./controller-icon-C2QQZ_hH-B4xNdxj9.js";/*!
 * KoliBri - The accessible HTML-Standard
 */const i=["default","visibility-toggle"],m=(o,t)=>{r(o,"_variant",e=>typeof e=="string"&&i.includes(e),new Set(i),t)};class C extends d{constructor(t,e,s){super(t,e,s),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){l(this.component,t)}validateHasCounter(t){p(this.component,t)}validateMaxLengthBehavior(t){c(this.component,t)}validateVariant(t){m(this.component,t)}validateMaxLength(t){h(this.component,"_maxLength",t,{min:0})}validatePattern(t){a(this.component,"_pattern",t)}validatePlaceholder(t){a(this.component,"_placeholder",t)}validateReadOnly(t){n(this.component,"_readOnly",t)}validateRequired(t){n(this.component,"_required",t)}validateValue(t){a(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{C as I};
//# sourceMappingURL=controller-BevWqlyP-B6ydtOum.js.map
