/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";const index=require("./index-cb2ce614.js"),controllerIcon=require("./controller-icon-d5ce4793.js");class InputPasswordController extends controllerIcon.InputIconController{constructor(e,t,o){super(e,t,o),this.component=e}validateAutoComplete(e){index.watchValidator(this.component,"_autoComplete",(e=>"string"==typeof e&&("on"===e||"off"===e)),new Set(["on | off"]),e)}validateHasCounter(e){index.validateHasCounter(this.component,e)}validateMaxLength(e){index.watchNumber(this.component,"_maxLength",e,{min:0})}validatePattern(e){index.watchString(this.component,"_pattern",e)}validatePlaceholder(e){index.watchString(this.component,"_placeholder",e)}validateReadOnly(e){index.watchBoolean(this.component,"_readOnly",e)}validateRequired(e){index.watchBoolean(this.component,"_required",e)}validateValue(e){index.watchString(this.component,"_value",e),this.setFormAssociatedValue(this.component.state._value)}componentWillLoad(){super.componentWillLoad(),this.validateAutoComplete(this.component._autoComplete),this.validateHasCounter(this.component._hasCounter),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)}onBlur(e){this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:this.placeholderCache}),this.placeholderCache=void 0,super.onBlur(e)}onFocus(e){this.placeholderCache=this.component.state._placeholder,this.component.state=Object.assign(Object.assign({},this.component.state),{_placeholder:void 0}),super.onFocus(e)}}exports.InputPasswordController=InputPasswordController;