import Image from "next/image"; import { buildInvoiceInitials, type InvoiceLogoTone, } from "@/lib/dashboard/invoices-helpers"; import { resolveLogoSrc } from "@/lib/logo"; import { cn } from "@/lib/utils/ui"; type InvoiceLogoProps = { cardName: string; logo: string | null; size: number; containerClassName?: string; imageClassName?: string; fallbackClassName?: string; tone?: InvoiceLogoTone; }; export function InvoiceLogo({ cardName, logo, size, containerClassName, imageClassName, fallbackClassName, tone = "muted", }: InvoiceLogoProps) { const resolvedLogo = resolveLogoSrc(logo); return (
{resolvedLogo ? ( {`Logo ) : ( {buildInvoiceInitials(cardName)} )}
); }