import { Car, Calendar, Gauge, Fuel, Cog, Palette, Hash, FileText, Users, Shield, Wrench, CircleDot, } from "lucide-react" import { Card, CardContent, CardHeader, CardTitle, } from "@/shared/components/ui/card" import { Badge } from "@/shared/components/ui/badge" import { Separator } from "@/shared/components/ui/separator" type VehicleData = { id?: number make?: string model?: string year?: string sub_model?: string license_plate?: string vin_number?: string engine_number?: string | null engine_size?: string drivetrain?: string mileage?: string owners_number?: string front_tire_size?: string | null rear_tire_size?: string | null note?: string image_url?: string | null reg_date?: string | null mfg_date?: string | null created_at?: string updated_at?: string shop_type?: { id?: number; title?: string } vehicle_body_type?: { id?: number; title?: string } vehicle_fuel_type?: { id?: number; title?: string } vehicle_transmission?: { id?: number; title?: string } vehicle_color?: { id?: number; title?: string; code?: string } } type VehicleGeneralInfoProps = { vehicle: VehicleData } function InfoItem({ icon: Icon, label, value, }: { icon: React.ComponentType<{ className?: string }> label: string value?: string | null }) { return (
{label} {value || }
) } export function VehicleGeneralInfo({ vehicle }: VehicleGeneralInfoProps) { return (
{/* Vehicle Identity */} Vehicle Identity
{[vehicle.make, vehicle.model].filter(Boolean).join(" ") || "Unknown"} {vehicle.year && {vehicle.year}} {vehicle.sub_model && ( {vehicle.sub_model} )}
{/* Technical Specifications */} Technical Specifications
{vehicle.vehicle_body_type?.title && ( {vehicle.vehicle_body_type.title} )} {vehicle.vehicle_transmission?.title && ( {vehicle.vehicle_transmission.title} )} {vehicle.vehicle_fuel_type?.title && ( {vehicle.vehicle_fuel_type.title} )}
{/* Appearance & Shop */} Appearance {/* Dates & Notes */} Dates & Notes
{vehicle.note && ( <>
Note

{vehicle.note}

)}
) }