"use client" import { Package, Wrench, Layers } from "lucide-react" import { Card, CardContent, CardHeader, CardTitle } from "@/shared/components/ui/card" import type { DashboardData } from "./use-dashboard-data" type Props = { data: DashboardData } export function ItemsTotalsCard({ data }: Props) { const items = data.items_totals const stats = [ { label: "Parts", value: items?.parts ?? 0, icon: Package, color: "text-blue-600", bg: "bg-blue-500/10" }, { label: "Services", value: items?.services ?? 0, icon: Wrench, color: "text-violet-600", bg: "bg-violet-500/10" }, { label: "Service Groups", value: items?.service_groups ?? 0, icon: Layers, color: "text-amber-600", bg: "bg-amber-500/10" }, ] return ( Items {items?.total_items ?? 0} {stats.map((stat) => (
{stat.label}
{stat.value}
))}
) }