/* Copyright © 2024 Melbet - All Rights Reserved */ import{toRefs as z,ref as i,computed as n,unref as e}from"../../../../shared-assets/__shared_vue_deps_SRT2KB67.js";import{e as m}from"./78DyX9qOAGj0.js";import{useVueDemiVModel as L}from"./5qRZAw1ZlSqs.js";import{getListeners as R}from"./D88C_Puwlfvq.js";var A=Object.defineProperty,C=Object.defineProperties,G=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,f=(t,r,o)=>r in t?A(t,r,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[r]=o,p=(t,r)=>{for(var o in r||(r={}))H.call(r,o)&&f(t,o,r[o]);if(d)for(var o of d(r))J.call(r,o)&&f(t,o,r[o]);return t},b=(t,r)=>C(t,G(r));const U=({props:t,ctx:r})=>{const{attrs:o}=r,y=R(r),{accuracy:v,autocomplete:g,disabled:O,format:x,loading:j,max:V,maxlength:P,min:h,readonly:s,textarea:w,type:D,unsigned:M}=z(t),{modelValue:I,updateModelValue:B}=L(t),E=i(),c=i(!1),F=m("focus"),S=m("blur"),u=n(()=>e(O)||e(j)),l=n({get:()=>e(I),set(a){B(a)}}),k=n(()=>b(p(p({},y),{"update:modelValue":a=>{l.value=a}}),{input:a=>{l.value=a},focus:a=>{e(u)||e(s)||(c.value=!0,F(a))},blur:a=>{e(u)||e(s)||(c.value=!1,S(a))}})),q=n(()=>b(p({},o),{disabled:e(u),autocomplete:e(g),readonly:e(s),accuracy:e(v),format:e(x),max:e(V),min:e(h),textarea:e(w),type:e(D),unsigned:e(M),value:e(l),modelValue:e(l),maxlength:e(P)}));return{hasFocus:c,inputDisabled:u,listeners:k,valueModel:l,vBindData:q,focusInput:()=>{var a;return(a=e(E))==null?void 0:a.focus()}}};export{U as y};