"use client" import { Car } from "lucide-react" import { Bar, BarChart, XAxis, YAxis, CartesianGrid, Cell } from "recharts" import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/shared/components/ui/card" import { ChartContainer, ChartTooltip, ChartTooltipContent, type ChartConfig, } from "@/shared/components/ui/chart" import type { DashboardData } from "./use-dashboard-data" const chartConfig = { vehicles_count: { label: "Vehicles", color: "var(--color-blue-500, #3b82f6)", }, } satisfies ChartConfig const COLORS = ["#3b82f6", "#8b5cf6", "#06b6d4", "#f59e0b", "#ef4444", "#10b981", "#ec4899", "#6366f1"] type Props = { data: DashboardData } export function VehicleStatsCards({ data }: Props) { const bodyTypes = data.body_types_vehicle_totals ?? [] const makes = data.make_model_vehicle_totals?.makes ?? [] const bodyData = bodyTypes.map((bt: any) => ({ name: bt.body_type ?? "Unknown", vehicles_count: bt.vehicles_count ?? 0, })) const makeData = makes.map((m: any) => ({ name: m.make ?? "Unknown", vehicles_count: m.vehicles_count ?? 0, })) return (
No vehicle data
)}No vehicle data
)}