import{b as p,j as t}from"./index-D9pJRAs5.js";import{L as v}from"./ui-CtYVlq7P.js";const f=({children:a,variant:d="primary",size:o="md",icon:r,isLoading:s=!1,block:i=!1,className:l="",disabled:n,...h})=>{const{theme:m}=p(),e=m.mode==="dark",b="inline-flex items-center justify-center font-bold rounded-xl transition-all duration-300 active:scale-95 disabled:opacity-50 disabled:pointer-events-none disabled:active:scale-100",g={sm:"px-3 py-1.5 text-xs",md:"px-5 py-2.5 text-sm",lg:"px-6 py-3.5 text-base"},x={primary:"bg-gradient-to-r from-indigo-600 to-purple-600 hover:from-indigo-500 hover:to-purple-500 text-white shadow-lg shadow-indigo-500/25 hover:shadow-indigo-500/40",secondary:e?"bg-slate-800 hover:bg-slate-700 text-white border border-slate-700":"bg-white hover:bg-slate-50 text-slate-900 border border-slate-200 shadow-sm hover:shadow-md",outline:e?"border-2 border-slate-700 hover:border-indigo-500 text-slate-400 hover:text-indigo-400 bg-transparent":"border-2 border-slate-200 hover:border-indigo-500 text-slate-600 hover:text-indigo-600 bg-transparent",ghost:e?"text-slate-400 hover:text-white hover:bg-slate-800":"text-slate-500 hover:text-indigo-600 hover:bg-indigo-50",danger:"bg-gradient-to-r from-rose-500 to-pink-600 hover:from-rose-400 hover:to-pink-500 text-white shadow-lg shadow-rose-500/25",success:"bg-gradient-to-r from-emerald-500 to-teal-600 hover:from-emerald-400 hover:to-teal-500 text-white shadow-lg shadow-emerald-500/25"};return t.jsxs("button",{className:`
        ${b}
        ${g[o]}
        ${x[d]}
        ${i?"w-full":""}
        ${l}
      `,disabled:n||s,...h,children:[s?t.jsx(v,{className:"mr-2 h-4 w-4 animate-spin"}):r?t.jsx(r,{className:`mr-2 ${o==="lg"?"h-5 w-5":"h-4 w-4"}`}):null,a]})};export{f as M};
