import{C as e,E as t,l as n,o as r,u as i,ut as a}from"./runtime-core.esm-bundler-DTXUv7Wx.js";var o=[`type`,`disabled`],s={key:0,class:`inline-block h-3 w-3 rounded-full border-2 border-current border-t-transparent animate-spin`},c=`inline-flex items-center justify-center gap-2 font-sans font-semibold rounded-pill border transition-all duration-base ease-out disabled:opacity-50 disabled:cursor-not-allowed disabled:transform-none disabled:shadow-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-brand`,l={__name:`Button`,props:{variant:{type:String,default:`primary`,validator:e=>[`primary`,`accent`,`secondary`,`ghost`,`danger`].includes(e)},size:{type:String,default:`md`,validator:e=>[`sm`,`md`,`lg`].includes(e)},type:{type:String,default:`button`},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},block:{type:Boolean,default:!1}},emits:[`click`],setup(l){let u=l,d={primary:`bg-brand text-accent border-brand hover:bg-brand-hover hover:-translate-y-0.5 hover:shadow-md`,accent:`bg-accent text-brand border-accent hover:bg-accent-soft hover:-translate-y-0.5 hover:shadow-md`,secondary:`bg-transparent text-brand border-brand hover:bg-brand hover:text-accent`,ghost:`bg-transparent text-brand border-transparent hover:bg-brand-wash`,danger:`bg-danger text-white border-danger hover:opacity-90 hover:-translate-y-0.5 hover:shadow-md`},f={sm:`text-[13px] px-[18px] py-[9px] tracking-label`,md:`text-[15px] px-[26px] py-[13px] tracking-label`,lg:`text-[16px] px-[34px] py-[17px] tracking-label`},p=r(()=>[c,d[u.variant],f[u.size],u.block?`w-full`:``]);return(r,c)=>(e(),i(`button`,{type:l.type,disabled:l.disabled||l.loading,class:a(p.value),onClick:c[0]||=e=>r.$emit(`click`,e)},[l.loading?(e(),i(`span`,s)):n(``,!0),t(r.$slots,`before`),t(r.$slots,`default`),t(r.$slots,`after`)],10,o))}};export{l as t};