import{a as m,j as e,c as d}from"./index-CUDottTv.js";import{S as u}from"./sparkline-BYGr_Iny.js";import{M as j}from"./minus-BzY257S7.js";/**
 * @license lucide-react v0.469.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const h=m("TrendingDown",[["polyline",{points:"22 17 13.5 8.5 8.5 13.5 2 7",key:"1r2t7k"}],["polyline",{points:"16 17 22 17 22 11",key:"11uiuu"}]]);/**
 * @license lucide-react v0.469.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const N=m("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);function g({label:i,value:l,suffix:n,change:t,icon:r,className:x,children:s}){return e.jsxs("div",{className:d("rounded-lg border border-border-default bg-bg-elevated p-5","transition-colors hover:border-border-strong",x),children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("span",{className:"text-xs font-medium text-text-tertiary",children:i}),r&&e.jsx("span",{className:"text-text-muted",children:r})]}),e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"text-2xl font-bold text-text-primary tracking-tight",children:l}),n&&e.jsx("span",{className:"text-sm text-text-tertiary",children:n})]}),t&&e.jsxs("div",{className:"mt-2 flex items-center gap-1.5",children:[e.jsxs("span",{className:d("text-xs font-medium",t.value>0?"text-green":t.value<0?"text-red":"text-text-tertiary"),children:[t.value>0?"+":"",t.value,"%"]}),t.label&&e.jsx("span",{className:"text-xs text-text-muted",children:t.label})]}),s&&e.jsx("div",{className:"mt-3",children:s})]})}function w({icon:i,label:l,value:n,unit:t,prefix:r,sparkColor:x="var(--color-blue)",sparkData:s,footerLabel:p,changeValue:o,changeDir:a="neutral",footerExtra:c}){const b=a==="up"?N:a==="down"?h:j;return e.jsxs("div",{className:"bg-bg-surface border border-border-strong rounded-lg overflow-hidden transition-colors hover:border-border-hover",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3.5 py-2.5 bg-bg-base border-b border-border-muted",children:[e.jsx(i,{size:18,className:"text-text-muted shrink-0"}),e.jsx("span",{className:"text-[12px] font-semibold text-text-secondary flex-1 truncate",children:l})]}),e.jsxs("div",{className:"flex items-end justify-between gap-3 px-3.5 py-3.5",children:[e.jsxs("div",{className:"flex items-baseline gap-1",children:[r&&e.jsx("span",{className:"text-sm text-text-tertiary",children:r}),e.jsx("span",{className:"text-[28px] font-bold tabular-nums leading-none tracking-tight",children:n}),t&&e.jsx("span",{className:"text-sm text-text-tertiary",children:t})]}),s&&s.length>1&&e.jsx("div",{className:"w-[120px] h-8 shrink-0 opacity-85 hover:opacity-100 transition-opacity",children:e.jsx(u,{data:s,color:x,height:32})})]}),e.jsxs("div",{className:"flex items-center gap-1.5 px-3.5 py-2 border-t border-border-muted text-[11px] font-medium text-text-muted",children:[e.jsx("span",{className:"flex-1",children:p}),o&&e.jsxs("span",{className:d("inline-flex items-center gap-1 font-semibold",a==="up"?"text-green":a==="down"?"text-red":"text-text-tertiary"),children:[e.jsx(b,{size:11}),o]}),c&&e.jsx("span",{className:"text-text-muted ml-0.5",children:c})]})]})}export{w as K,g as M,N as T};
