"use client"; import { cn } from "@/lib/utils"; import { TrendingUp, TrendingDown, Wallet, PieChart } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { ChainIcon } from "./ChainIcon"; import type { PortfolioSummary as PortfolioSummaryType, PortfolioToken } from "@/lib/mock/cryptoMockData"; import { formatPrice, formatPercent, formatLargeNumber } from "@/lib/mock/cryptoMockData"; interface PortfolioSummaryProps { portfolio: PortfolioSummaryType; className?: string; } function StatCard({ label, value, change, changePercent, }: { label: string; value: string; change?: number; changePercent?: number; }) { const isPositive = change !== undefined && change > 0; const isNegative = change !== undefined && change < 0; return (
{label}
{value}
{change !== undefined && changePercent !== undefined && (