import{D as e,H as t,J as n,K as r,_ as i,vt as a,x as o,xt as s,y as c}from"./CaGtQlYh.js";import{t as l}from"#entry";var u=[`type`,`disabled`],d={key:0,class:`loading loading-spinner`},f=Object.assign(l(e({__name:`Button`,props:{type:{default:`button`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},icon:{},class:{}},emits:[`click`],setup(e){let l=e,f=i(()=>l.class||``),p=i(()=>f.value.includes(`btn-`));return(i,l)=>(t(),o(`button`,{type:e.type,class:s([`btn-press inline-flex items-center justify-center gap-2`,[a(p)&&`btn`,a(f),e.loading&&`btn-disabled cursor-wait`]]),disabled:e.disabled||e.loading,onClick:l[0]||=e=>i.$emit(`click`,e)},[e.loading?(t(),o(`div`,d)):e.icon?(t(),c(n(e.icon),{key:1})):r(i.$slots,`default`,{key:2},void 0,!0)],10,u))}}),[[`__scopeId`,`data-v-0e7be521`]]),{__name:`Button`});export{f as t};