"use client" import { motion } from "framer-motion" import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card" import { Badge } from "@/components/ui/badge" import { LeadStatusBadge } from "./lead-status-badge" import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar" import { Lead } from "@/types" import { Building2, Mail, Phone, Globe, User, CalendarDays, Clock, Tag, } from "lucide-react" interface LeadDetailsCardProps { lead: Lead } export function LeadDetailsCard({ lead }: LeadDetailsCardProps) { const fields = [ { icon: Building2, label: "Company", value: lead.companyName }, { icon: User, label: "Contact", value: lead.contactName }, { icon: Mail, label: "Email", value: lead.email }, { icon: Phone, label: "Phone", value: lead.phone || "—" }, { icon: Globe, label: "Source", value: lead.source || "—" }, { icon: Tag, label: "Status", value: }, { icon: CalendarDays, label: "Created", value: new Date(lead.createdAt).toLocaleDateString() }, { icon: Clock, label: "Updated", value: new Date(lead.updatedAt).toLocaleDateString() }, ] return ( Lead Information
{fields.map((field, i) => (

{field.label}

{field.value}
))}
{lead.description && (

Description

{lead.description}

)}

Assigned User

{lead.assignedUser ? (
{lead.assignedUser.name[0]}

{lead.assignedUser.name}

{lead.assignedUser.role}
) : (

No user assigned

)}
) }