const e=require("./KeyCode.js");let t=require("vue");var n={border:0,background:`transparent`,padding:0,lineHeight:`inherit`,display:`inline-block`},r=(0,t.defineComponent)({compatConfig:{MODE:3},name:`TransButton`,inheritAttrs:!1,props:{noStyle:{type:Boolean,default:void 0},onClick:Function,disabled:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0}},setup(r,{slots:i,emit:a,attrs:o,expose:s}){let c=(0,t.shallowRef)(),l=t=>{let{keyCode:n}=t;n===e.default.ENTER&&t.preventDefault()},u=t=>{let{keyCode:n}=t;n===e.default.ENTER&&a(`click`,t)},d=e=>{a(`click`,e)},f=()=>{c.value&&c.value.focus()};return(0,t.onMounted)(()=>{r.autofocus&&f()}),s({focus:f,blur:()=>{c.value&&c.value.blur()}}),()=>{let{noStyle:e,disabled:a,...s}=r,f={};return e||(f={...n}),a&&(f.pointerEvents=`none`),(0,t.createVNode)(`div`,{role:`button`,tabindex:0,ref:c,...s,...o,onClick:d,onKeydown:l,onKeyup:u,style:{...f,...o.style||{}}},[i.default?.()])}}});exports.default=r;