import{o as e,t}from"./vue.runtime.esm-BGP6PPFT.js";import{a as n,i as r,l as i,n as a,r as o,s,t as c}from"./_plugin-vue2_normalizer-Vm4EDAeQ.js";import{$ as l,Jt as u,t as d}from"./lib-DqsS17DW.js";d(),e();var f=class extends t{inputValue;small;xSmall;submitOnEnter;submitOnChange;form;onValue(e){this.hasFocus||(this.currentValue=e)}currentValue=``;hasFocus=!1;get filteredListeners(){let{focus:e,blur:t,change:n,...r}=this.$listeners;return r}handleSubmit(){this.submitOnEnter&&!this.submitOnChange&&this.form.validate()&&this.$emit(`submit`,this.currentValue)}handleChange(){this.$emit(`change`,this.currentValue),this.submitOnChange&&this.form.validate()&&this.$emit(`submit`,this.currentValue)}handleFocus(e){this.hasFocus=!0,e.target instanceof HTMLInputElement&&(e.target.select(),this.$emit(`focus`,e))}handleBlur(e){this.currentValue=this.inputValue,this.hasFocus=!1,this.$emit(`blur`,e)}mounted(){this.currentValue=this.inputValue}};a([r()],f.prototype,`inputValue`,void 0),a([s({type:Boolean})],f.prototype,`small`,void 0),a([s({type:Boolean})],f.prototype,`xSmall`,void 0),a([s({type:Boolean,default:!0})],f.prototype,`submitOnEnter`,void 0),a([s({type:Boolean})],f.prototype,`submitOnChange`,void 0),a([n(`form`)],f.prototype,`form`,void 0),a([o(`value`)],f.prototype,`onValue`,null),f=a([i({inheritAttrs:!1})],f);var p=c(f,function(){var e=this,t=e._self._c;return e._self._setupProxy,t(l,{ref:`form`,staticClass:`flex`,on:{submit:function(t){return t.preventDefault(),e.handleSubmit.apply(null,arguments)}}},[t(u,e._g(e._b({class:{"v-input--width-small":e.small,"v-input--width-x-small":e.xSmall},on:{change:e.handleChange,focus:e.handleFocus,blur:e.handleBlur},model:{value:e.currentValue,callback:function(t){e.currentValue=t},expression:`currentValue`}},`v-text-field`,e.$attrs,!1),e.filteredListeners),[e._l(Object.keys(e.$slots),function(t){return e._t(t,null,{slot:t})})],2)],1)},[],!1,null,null,null,null).exports;export{p as t};