import{_ as p,r as b,o,f as m,w as f,a as c,n as i,Q as a,c as r,R as y,a1 as g}from"./index-696ae00c.js";const h={props:{styles:{type:Object,default(){return{input:{}}}},modelValue:[String,Number],pressable:{type:Boolean,default:!0},kind:{type:String,default:"input"},type:{type:String,default:"text"},min:{type:String,default:""},max:{type:String,default:""}},watch:{input(e){this.$emit("update:modelValue",e)},modelValue(e){this.input=e}},methods:{focus(){this.focused=!0},blur(){this.focused=!1},keydown(e){e.stopPropagation()}},data(){return{input:this.modelValue,focused:!1}},mounted(){const e=this.$refs.input;e.addEventListener("focus",this.focus),e.addEventListener("blur",this.blur),e.addEventListener("keydown",this.keydown)},beforeUnmount(){const e=this.$refs.input;e.removeEventListener("keydown",this.keydown),e.removeEventListener("focus",this.focus),e.removeEventListener("blur",this.blur)}};const x=h,v=["min","max","disabled"],k=["type","min","max","disabled"];function w(e,n,S,_,E,V){const d=b("lounge");return o(),m(d,null,{default:f(({palette:t,style:u,terrain:l})=>[c("div",{style:i(Object.assign({},{margin:"0 2px",borderRadius:"6px",boxSizing:"border-box",padding:"2px",outline:e.focused?l.layout.lines+" solid "+t[2]:"0px solid "+t[2]},u))},[e.kind==="textarea"?a((o(),r("textarea",{key:0,"onUpdate:modelValue":n[0]||(n[0]=s=>e.input=s),ref:"input",class:"decor-input",min:e.min,max:e.max,style:i(Object.assign({},t.button,{boxSizing:"border-box",width:"100%",height:"100%",padding:"0 8px",transition:["background "+t.change_duration,"color "+t.change_duration,"border .3s","outline .1s"].join(", "),outline:0,fontSize:"1rem",textIndent:"5px",borderRadius:"6px",fontWeight:700,cursor:e.pressable?"auto":"default",opacity:e.pressable?1:.3},e.styles.input)),disabled:!e.pressable},null,12,v)),[[y,e.input]]):a((o(),r("input",{key:1,type:e.type,"onUpdate:modelValue":n[1]||(n[1]=s=>e.input=s),ref:"input",class:"decor-input",min:e.min,max:e.max,style:i(Object.assign({},t.button,{display:"block",boxSizing:"border-box",width:"100%",padding:"8px 7px 8px 2px",transition:["background "+t.change_duration,"color "+t.change_duration,"border .3s","outline .1s"].join(", "),outline:0,fontSize:"1rem",textIndent:"5px",borderRadius:"6px",fontWeight:700,cursor:e.pressable?"auto":"default",opacity:e.pressable?1:.3},e.styles.input)),disabled:!e.pressable},null,12,k)),[[g,e.input]])],4)]),_:1})}const j=p(x,[["render",w],["__scopeId","data-v-5a900ba1"]]);export{j as s};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 9520 characters]
