"use client"; import type { Deal, PipelineStage } from "@/types"; import { Calendar, Check, X } from "lucide-react"; import { formatCurrency } from "@/lib/currency"; import { useTranslations } from "next-intl"; interface DealCardProps { deal: Deal; stage: PipelineStage | null; onEdit: (deal: Deal) => void; isOverlay?: boolean; } function formatDate(dateStr: string) { return new Date(dateStr).toLocaleDateString("en-US", { month: "short", day: "numeric", year: "numeric", }); } function initials(name?: string, fallback?: string) { const source = (name || fallback || "?").trim(); if (!source) return "?"; return source.charAt(0).toUpperCase(); } export function DealCard({ deal, stage, onEdit, isOverlay }: DealCardProps) { const t = useTranslations("Pipelines.card"); const contactLabel = deal.contact?.name || deal.contact?.phone || t("noContact"); const assigneeLabel = deal.assignee?.full_name || null; return ( ); }