import { TrendingDown, TrendingUp } from "lucide-react"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { cn } from "@/lib/utils"; const formatPrice = (value: number) => `${value.toLocaleString("fa-IR")} ریال`; const formatChange = (value: number) => `${new Intl.NumberFormat("fa-IR", { minimumFractionDigits: 1, maximumFractionDigits: 1, signDisplay: "exceptZero", }).format(value)}٪`; interface StatsCard1Props { title?: string; value?: string; change?: number; changeLabel?: string; className?: string; } const StatsCard1 = ({ title = "درآمد کل", value = formatPrice(45231890), change = 20.1, changeLabel = "نسبت به ماه قبل", className, }: StatsCard1Props) => { const isPositive = change >= 0; return ( {title}
{value}
{isPositive ? ( ) : ( )} {formatChange(change)} {changeLabel}
); }; export { StatsCard1 };