(function(t,d){typeof exports=="object"&&typeof module<"u"?module.exports=d(require("vue")):typeof define=="function"&&define.amd?define(["vue"],d):(t=typeof globalThis<"u"?globalThis:t||self,t.AppButton=d(t.Vue))})(this,function(t){"use strict";const d=e=>{const l=e;l.addEventListener("pointerdown",n=>{const{clientX:o,clientY:s}=n.touches?n.touches[0]:n,{left:a,top:i,width:h,height:m}=l.getBoundingClientRect(),_=Math.sqrt(h**2+m**2)*2;l.style.cssText="--s: 0; --o: 1;",l.offsetTop,l.style.cssText=`--t: 1; --o: 0; --d: ${_.toFixed(1)}; --x:${(o-a).toFixed(1)}; --y:${(s-i).toFixed(1)};`})},y="",r=(e,l)=>{const n=e.__vccOpts||e;for(const[o,s]of l)n[o]=s;return n},f={name:"AppButton",props:{theme:{type:String,default:""},size:{type:String,default:"md"},shape:{type:String,default:""},variation:{type:String,default:""},ripple:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},progress:{type:Boolean,default:!1},route:{type:String,default:""},href:{type:String,default:""},forceRipple:{type:Boolean,default:!1}},setup(e){const l=t.ref(null),n=t.computed(()=>{const o={btn:!0,"btn--sm":e.size==="sm","btn--md":e.size==="md","btn--lg":e.size==="lg","btn--rounded":e.shape==="rounded","btn--round":e.shape==="round","btn--contained":e.variation==="contained","btn--outlined":e.variation==="outlined","btn--text":e.variation==="text",[`btn--theme-${e.theme}`]:e.theme!==""};return e.ripple&&(o["btn--ripple"]=!0),e.progress&&(o["btn--progress"]=!0),e.disabled&&(o["btn--disabled"]=!0),o});return t.onMounted(()=>{(e.ripple||e.forceRipple)&&d(l.value)}),{buttonRef:l,btnClass:n}}},c=["disabled"],u=["href","disabled"];function b(e,l,n,o,s,a){const i=t.resolveComponent("router-link");return!n.route&&!n.href?(t.openBlock(),t.createElementBlock("button",{key:0,class:t.normalizeClass(o.btnClass),disabled:n.disabled,ref:"buttonRef"},[t.renderSlot(e.$slots,"default")],10,c)):n.route?(t.openBlock(),t.createBlock(i,{key:1,to:n.route,class:t.normalizeClass(o.btnClass),disabled:n.disabled?!0:void 0,ref:"buttonRef"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["to","class","disabled"])):n.href?(t.openBlock(),t.createElementBlock("a",{key:2,href:n.href,class:t.normalizeClass(o.btnClass),disabled:n.disabled?!0:void 0,ref:"buttonRef"},[t.renderSlot(e.$slots,"default")],10,u)):t.createCommentVNode("",!0)}return r(f,[["render",b]])});