/*!
 * KoliBri - The accessible HTML-Standard
 */
import{g as t,e as i}from"./common-DEEjER7G.js";import{v as s}from"./auto-complete-CrQJr3SH.js";import{a,v as h,b as e}from"./max-length-behavior-426q5CU6.js";import{v as o}from"./placeholder-CSgrK1Zh.js";import{v as r}from"./read-only-DyuIPHMt.js";import{v as l}from"./required-DAsW5lI1.js";import{v as m}from"./variant-class-name-CkfE8oGZ.js";import{I as v}from"./controller-icon-ClFIXmW5.js";const n=(i,s,a={})=>{t(i,"_pattern",s,a)};const d=(t,s,a)=>{i(t,"_visibilityToggle",s,a)};class p extends v{constructor(t,i,s){super(t,i,s);this.afterSyncCharCounter=()=>{if(typeof this.component._value==="string"){this.component.state._currentLength=this.component._value.length;this.updateCurrentLengthDebounced(this.component._value.length)}};this.component=t}validateAutoComplete(t){s(this.component,t)}validateHasCounter(t){a(this.component,t)}validateMaxLengthBehavior(t){h(this.component,t)}validateMaxLength(t){e(this.component,t,{hooks:{afterPatch:this.afterSyncCharCounter}})}validatePattern(t){n(this.component,t)}validatePlaceholder(t){o(this.component,t)}validateReadOnly(t){r(this.component,t)}validateRequired(t){l(this.component,t)}validateValue(i){t(this.component,"_value",i,{hooks:{afterPatch:this.afterSyncCharCounter}});this.setFormAssociatedValue(this.component.state._value)}validateVariant(t){m(this.component,t)}validateVisibilityToggle(t){d(this.component,t)}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);this.validateVisibilityToggle(this.component._visibilityToggle)}}export{p as I};
//# sourceMappingURL=controller-eoW_d0fK.js.map