"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("vue"),u=require("../../utils/json2css.js"),m=["type","value","placeholder"],y=t.defineComponent({name:"zv-interaction-input"}),S=t.defineComponent({...y,props:{basicOption:{},useEvents:{}},emits:["on-blur","on-focus","on-input","on-change"],setup(l,{emit:i}){const s=i,r=()=>{const e=t.ref();return{rendererDomStyle:o=>{if(u.autoInstallFont(o.fontFamily),u.autoInstallFont(o.focus.fontFamily),e.value)return{...u.jsonToCssStyle(o),...u.jsonToCssStyle(o.focus,"focus"),...u.jsonToCssStyle(o.placeholder,"placeholder")}},inputRef:e}},a=l,p=e=>{n.value&&(s("on-blur",e,n.value.value),window.SHJParseEvent(a.useEvents,"on-blur",{data:n.value.value,event:e}))},c=e=>{n.value&&(s("on-focus",e,n.value.value),window.SHJParseEvent(a.useEvents,"on-focus",{data:n.value.value,event:e}))},v=e=>{n.value&&(s("on-input",e,n.value.value),window.SHJParseEvent(a.useEvents,"on-input",{data:n.value.value,event:e}))},f=e=>{n.value&&(s("on-change",e,n.value.value),window.SHJParseEvent(a.useEvents,"on-change",{data:n.value.value,event:e}))},{rendererDomStyle:d,inputRef:n}=r();return(e,h)=>(t.openBlock(),t.createElementBlock("input",{ref_key:"inputRef",ref:n,type:e.basicOption.css.type||"text",class:"zerov-widget-input",value:e.basicOption.value,placeholder:e.basicOption.placeholderValue,style:t.normalizeStyle(t.unref(d)(e.basicOption.css)),onBlur:t.withModifiers(p,["stop"]),onFocus:t.withModifiers(c,["stop"]),onInput:t.withModifiers(v,["stop"]),onChange:t.withModifiers(f,["stop"])},null,44,m))}});exports.default=S;
