import{n,w as s}from"./index-B6uGkrgD.js";import{v as r}from"./auto-complete-69d94cWC-BwnKTkP0.js";import{a as h,v as l,b as d}from"./max-length-behavior-BfK6OnzA-C1lyAzpl.js";import{v as p}from"./placeholder-D8vH7TM6-CuIrA3HD.js";import{v as c}from"./read-only-C5tWj8H1-DkI7dQDm.js";import{v as m}from"./required-Dt9l4wUg-C-E6CRnV.js";import{a as v}from"./controller-icon-SbmKNSTK-Bd5Jqbpp.js";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-CzRnQolh-CKvQTArl.js.map
