import{e as m,c as o,n as r,h as l,j as b,J as f,U as y,H as i,o as n}from"./Fc7vEJt1.js";const k=["type","disabled"],g={key:0,class:"loading loading-spinner"},B=m({__name:"Button",props:{type:{default:"button"},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},icon:{},class:{}},emits:["click"],setup(e){const c=e,t=i(()=>c.class||""),d=i(()=>t.value.includes("btn-"));return(s,a)=>(n(),o("button",{type:e.type,class:r(["inline-flex items-center justify-center gap-2",[l(d)&&"btn",l(t),e.loading&&"btn-disabled cursor-wait"]]),disabled:e.disabled||e.loading,onClick:a[0]||(a[0]=u=>s.$emit("click",u))},[e.loading?(n(),o("div",g)):e.icon?(n(),b(f(e.icon),{key:1})):y(s.$slots,"default",{key:2})],10,k))}}),C=Object.assign(B,{__name:"Button"});export{C as _};
