import{r as t,c as s,h as i,H as h,g as e}from"./p-561c15f0.js";const a=class{constructor(i){t(this,i),this.balInput=s(this,"balInput",7),this.balBlur=s(this,"balBlur",7),this.balClick=s(this,"balClick",7),this.balKeyDown=s(this,"balKeyDown",7),this.balKeyPress=s(this,"balKeyPress",7),this.balKeyUp=s(this,"balKeyUp",7),this.balFocus=s(this,"balFocus",7),this.inputId="bal-in-"+l++,this.name=this.inputId,this.type="text",this.placeholder="",this.inverted=!1,this.readonly=!1,this.disabled=!1,this.clickable=!1,this.value="",this.onInput=t=>{var s;let i=t.target&&(null===(s=t.target)||void 0===s?void 0:s.value);this.value=i,this.balInput.emit(this.value)}}valueChanged(){this.inputEl.value!==this.value&&(this.inputEl.value=this.value)}async setFocus(){this.inputEl.focus()}render(){return i(h,null,i("input",{class:{input:!0,"is-inverted":this.inverted,clickable:this.clickable},id:this.inputId,type:this.type,placeholder:this.placeholder,name:this.name,value:this.value,disabled:this.disabled,readonly:this.readonly,onInput:t=>this.onInput(t),onBlur:t=>this.balBlur.emit(t),onClick:t=>this.balClick.emit(t),onKeyDown:t=>this.balKeyDown.emit(t),onKeyPress:t=>this.balKeyPress.emit(t),onKeyUp:t=>this.balKeyUp.emit(t),onFocus:t=>this.balFocus.emit(t),ref:t=>this.inputEl=t}))}get el(){return e(this)}static get watchers(){return{value:["valueChanged"]}}};let l=0;a.style="@keyframes spinAround{from{transform:rotate(0deg)}to{transform:rotate(359deg)}}.sc-bal-input-h{display:block}";export{a as bal_input}