import { Button, Separator } from "@repo/shadcn-ui/components"; import { CreditCard, EyeIcon, MapPinHouseIcon, RefreshCwIcon, UserIcon, UserPlusIcon, } from "lucide-react"; import { CustomerSummary } from "../../schemas"; interface CustomerCardProps { customer: CustomerSummary; onViewCustomer?: () => void; onChangeCustomer?: () => void; onAddNewCustomer?: () => void; } export const CustomerCard = ({ customer, onViewCustomer, onChangeCustomer, onAddNewCustomer, }: CustomerCardProps) => { const hasAddress = customer.street || customer.street2 || customer.city || customer.postal_code || customer.province || customer.country; return (
{/* Avatar mejorado con gradiente sutil */}
{/* Nombre del cliente */}

{customer.name}

{/* NIF/CIF con icono */} {customer.tin && (
{customer.tin}
)} {/* Separador si hay dirección */} {hasAddress && } {/* Dirección con mejor estructura */} {hasAddress && (
{customer.street &&
{customer.street}
} {customer.street2 &&
{customer.street2}
}
{customer.postal_code && {customer.postal_code}} {customer.city && {customer.city}}
{customer.province && {customer.province}} {customer.country && {customer.country}}
)}
); };