import{r as m,j as e}from"./index-DiwDH9aE.js";const v=m.forwardRef(({variant:n="primary",size:c="md",text:u,children:b,leftIcon:t,rightIcon:a,loading:r=!1,disabled:s=!1,fullWidth:i=!1,className:f="",...d},g)=>{const h={primary:{base:"bg-[#00306e] text-white border border-[#00306e]",hover:"hover:bg-[#002554] hover:border-[#002554]",focus:"focus:ring-2 focus:ring-[#00306e]/20"},secondary:{base:"bg-gray-600 text-white border border-gray-600",hover:"hover:bg-gray-700 hover:border-gray-700",focus:"focus:ring-2 focus:ring-gray-500/20"},success:{base:"bg-[#287a0e] text-white border border-[#287a0e]",hover:"hover:bg-[#1e5f0a] hover:border-[#1e5f0a]",focus:"focus:ring-2 focus:ring-green-500/20"},warning:{base:"bg-[#ef7d00] text-white border border-[#ef7d00]",hover:"hover:bg-[#d67000] hover:border-[#d67000]",focus:"focus:ring-2 focus:ring-orange-500/20"},outline:{base:"bg-white text-[#00306e] border border-[#00306e]",hover:"hover:bg-[#00306e] hover:text-white",focus:"focus:ring-2 focus:ring-[#00306e]/20"},ghost:{base:"bg-transparent text-gray-600 border border-transparent",hover:"hover:bg-gray-50 hover:text-gray-900",focus:"focus:ring-2 focus:ring-gray-500/20"}},x={sm:"px-3 py-2 text-sm rounded-md",md:"px-4 py-2.5 text-sm rounded-lg",lg:"px-6 py-3 text-base rounded-lg"},p=`
    font-medium transition-all duration-200
    focus:outline-none focus:ring-offset-1
    flex items-center justify-center gap-2
    ${s||r?"opacity-50 cursor-not-allowed":"cursor-pointer"}
    ${i?"w-full":""}
  `,o=h[n],l=`
    ${p}
    ${x[c]}
    ${o.base}
    ${!s&&!r?o.hover:""}
    ${!s&&!r?o.focus:""}
    ${f}
  `.trim();return e.jsxs("button",{ref:g,className:l,disabled:s||r,...d,children:[r&&e.jsx("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}),!r&&t&&e.jsx("span",{className:"flex-shrink-0",children:t}),e.jsx("span",{children:u||b}),!r&&a&&e.jsx("span",{className:"flex-shrink-0",children:a})]})});v.displayName="Button";export{v as B};
