import{r as e}from"./rolldown-runtime-hePW80VL.js";import{o as t}from"./vendor-forms-yQg41KHz.js";import{t as n}from"./vendor-react-CAGJwf-T.js";import{t as r}from"./createLucideIcon-FT8xbHot.js";import{t as i}from"./trending-up-_gu3scpr.js";var a=r(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),o=r(`trending-down`,[[`path`,{d:`M16 17h6v-6`,key:`t6n2it`}],[`path`,{d:`m22 17-8.5-8.5-5 5L2 7`,key:`x473p`}]]),s=e(t(),1),c=n(),l={blue:{iconBg:`bg-blue-50 dark:bg-blue-950/40`,iconRing:`ring-blue-100`,text:`text-blue-600`,glowBg:`bg-blue-500`,barBg:`bg-blue-500`},amber:{iconBg:`bg-amber-50 dark:bg-amber-950/40`,iconRing:`ring-amber-100`,text:`text-amber-600`,glowBg:`bg-amber-500`,barBg:`bg-amber-500`},emerald:{iconBg:`bg-emerald-50 dark:bg-emerald-950/40`,iconRing:`ring-emerald-100`,text:`text-emerald-600`,glowBg:`bg-emerald-500`,barBg:`bg-emerald-500`},indigo:{iconBg:`bg-indigo-50 dark:bg-indigo-950/40`,iconRing:`ring-indigo-100`,text:`text-indigo-600`,glowBg:`bg-indigo-500`,barBg:`bg-indigo-500`},violet:{iconBg:`bg-violet-50 dark:bg-violet-950/40`,iconRing:`ring-violet-100`,text:`text-violet-600`,glowBg:`bg-violet-500`,barBg:`bg-violet-500`},cyan:{iconBg:`bg-cyan-50 dark:bg-cyan-950/40`,iconRing:`ring-cyan-100`,text:`text-cyan-600`,glowBg:`bg-cyan-500`,barBg:`bg-cyan-500`},rose:{iconBg:`bg-rose-50 dark:bg-rose-950/40`,iconRing:`ring-rose-100`,text:`text-rose-600`,glowBg:`bg-rose-500`,barBg:`bg-rose-500`},pink:{iconBg:`bg-pink-50 dark:bg-pink-950/40`,iconRing:`ring-pink-100`,text:`text-pink-600`,glowBg:`bg-pink-500`,barBg:`bg-pink-500`},slate:{iconBg:`bg-slate-100 dark:bg-slate-800`,iconRing:`ring-slate-200`,text:`text-slate-600 dark:text-slate-400`,glowBg:`bg-slate-500`,barBg:`bg-slate-400`},orange:{iconBg:`bg-orange-50 dark:bg-orange-950/40`,iconRing:`ring-orange-100`,text:`text-orange-600`,glowBg:`bg-orange-500`,barBg:`bg-orange-500`},teal:{iconBg:`bg-teal-50 dark:bg-teal-950/40`,iconRing:`ring-teal-100`,text:`text-teal-600`,glowBg:`bg-teal-500`,barBg:`bg-teal-500`}},u=(0,s.memo)(function({icon:e,value:t,label:n,color:r=`blue`,subtitle:s,change:u,changeType:d=`neutral`,compact:f=!1}){let p=l[r];return(0,c.jsxs)(`div`,{className:`
        relative bg-[var(--color-surface)] rounded-xl border border-[var(--color-border)]
        overflow-hidden transition-all duration-200
        hover:shadow-md hover:border-slate-300 dark:hover:border-slate-600
        ${f?`p-3.5`:`p-4`}
      `,children:[(0,c.jsx)(`div`,{className:`absolute top-0 left-0 right-0 h-[2px] ${p.barBg} opacity-80`}),(0,c.jsx)(`div`,{className:`absolute -top-8 -right-8 w-24 h-24 rounded-full ${p.glowBg} opacity-[0.04]`}),(0,c.jsxs)(`div`,{className:`relative flex items-start justify-between gap-3`,children:[(0,c.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,c.jsx)(`p`,{className:`${f?`text-xl`:`text-2xl`} font-bold text-[var(--color-text-primary)] tracking-tight leading-none`,children:t}),(0,c.jsx)(`p`,{className:`text-[13px] text-[var(--color-text-muted)] mt-1.5 leading-tight`,children:n}),u?(0,c.jsxs)(`div`,{className:`flex items-center gap-1 mt-1.5`,children:[d===`positive`&&(0,c.jsx)(i,{className:`w-3 h-3 text-emerald-500`}),d===`negative`&&(0,c.jsx)(o,{className:`w-3 h-3 text-rose-500`}),d===`neutral`&&(0,c.jsx)(a,{className:`w-3 h-3 text-slate-400`}),(0,c.jsx)(`span`,{className:`text-[11px] font-semibold ${d===`positive`?`text-emerald-600`:d===`negative`?`text-rose-600`:`text-[var(--color-text-muted)]`}`,children:u})]}):s?(0,c.jsx)(`p`,{className:`text-[11px] font-medium mt-1.5 ${p.text} opacity-80`,children:s}):null]}),(0,c.jsx)(`div`,{className:`
            flex-shrink-0 flex items-center justify-center
            ${f?`w-9 h-9`:`w-10 h-10`}
            rounded-lg ${p.iconBg} ring-1 ${p.iconRing}
          `,children:(0,c.jsx)(`span`,{className:p.text,children:e})})]})]})});function d({compact:e=!1}){return(0,c.jsx)(`div`,{className:`bg-[var(--color-surface)] border border-[var(--color-border)] rounded-xl ${e?`p-3.5`:`p-4`}`,children:(0,c.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,c.jsxs)(`div`,{className:`flex-1`,children:[(0,c.jsx)(`div`,{className:`h-7 w-20 bg-slate-100 dark:bg-slate-800 rounded animate-pulse`}),(0,c.jsx)(`div`,{className:`h-3.5 w-24 bg-slate-100 dark:bg-slate-800 rounded animate-pulse mt-2`}),(0,c.jsx)(`div`,{className:`h-3 w-16 bg-slate-50 dark:bg-slate-900 rounded animate-pulse mt-2`})]}),(0,c.jsx)(`div`,{className:`${e?`w-9 h-9`:`w-10 h-10`} bg-slate-100 dark:bg-slate-800 rounded-lg animate-pulse`})]})})}export{d as n,u as t};