import{a as r,j as o}from"./router.chunk.YsRm4bSN.js";import{a as n}from"./utils.chunk.C1IATKsN.js";import{P as a}from"./pro-badge.chunk.PstHsVdU.js";import{I as t}from"./tooltip.chunk.DtTQ21GF.js";import{c as s,i as d}from"./main.chunk.N-eZ2ybB.js";import{M as g,aU as e,aV as f}from"./icons.chunk.BwnSC3zE.js";const u=n("growfund-p-6 growfund-rounded-md growfund-w-full growfund-flex growfund-flex-col growfund-gap-2 growfund-group/metric-card",{variants:{variant:{default:"growfund-bg-background-fill",primary:"growfund-bg-[#E3F5FF]",secondary:"growfund-bg-background-fill-secondary",success:"growfund-bg-[#DFF4E9]",warning:"growfund-bg-[#FFF4C2]",critical:"growfund-bg-[#FFEBE2]"}},defaultVariants:{variant:"default"}}),i=({growth:r})=>0===r?o.jsx(g,{className:"growfund-text-icon-secondary growfund-size-6"}):r>0?o.jsx(e,{className:"growfund-text-icon-success growfund-size-6"}):o.jsx(f,{className:"growfund-text-icon-critical growfund-size-6"}),c=r.forwardRef(({className:r,variant:n,data:g,isPro:e=!1,...f},c)=>o.jsxs("div",{ref:c,className:s(u({variant:n}),r),...f,children:[o.jsxs("p",{className:"growfund-typo-small growfund-font-medium growfund-text-fg-secondary growfund-flex growfund-items-center growfund-gap-2 [&>[data-type=tooltip]]:growfund-opacity-0 group-hover/metric-card:[&>[data-type=tooltip]]:growfund-opacity-100 growfund-transition-opacity",title:g.label,children:[o.jsxs("span",{className:"growfund-truncate",children:[g.label," ",e&&o.jsx(a,{})]}),g.tooltip&&o.jsx(t,{children:g.tooltip})]}),o.jsxs("div",{className:"growfund-flex growfund-items-center growfund-gap-2",children:[o.jsx("div",{className:s("growfund-typo-h3 growfund-font-medium growfund-text-fg-primary",e&&"growfund-bg-gradient-to-b growfund-from-black growfund-to-white growfund-bg-clip-text growfund-text-transparent growfund-opacity-10"),children:g.amount}),d(g.growth)&&o.jsxs("div",{className:s("growfund-typo-tiny growfund-text-fg-secondary growfund-flex growfund-items-center growfund-gap-2",e&&"growfund-opacity-20"),children:[o.jsxs("span",{children:[g.growth>0?"+":"",g.growth,"%"]}),o.jsx(i,{growth:g.growth})]})]})]}));c.displayName="MetricsCard";export{c as M};
