"use client" import { Users, Building2, Truck, Shield } 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 CustomersTotalsCard({ data }: Props) { const customers = data.customers_totals const stats = [ { label: "Individuals", value: customers?.individuals ?? 0, icon: Users, color: "text-sky-600", bg: "bg-sky-500/10" }, { label: "Companies", value: customers?.companies ?? 0, icon: Building2, color: "text-indigo-600", bg: "bg-indigo-500/10" }, { label: "Fleets", value: customers?.fleets ?? 0, icon: Truck, color: "text-teal-600", bg: "bg-teal-500/10" }, { label: "Insurers", value: customers?.insurers ?? 0, icon: Shield, color: "text-rose-600", bg: "bg-rose-500/10" }, ] return ( Customers {customers?.total_customers ?? 0} {stats.map((stat) => (
{stat.label}
{stat.value}
))}
) }