import type { ComputedBill } from "../types"; import { formatCurrency } from "../utils"; interface BillSummaryProps { bill: ComputedBill; } export function BillSummary({ bill }: BillSummaryProps) { if (bill.items.length === 0) return null; return (
Subtotal {formatCurrency(bill.subtotal, bill.currency)}
{bill.taxPercent > 0 && (
{bill.taxType} {bill.taxPercent}% {formatCurrency(bill.taxAmount, bill.currency)}
)}
Total {formatCurrency(bill.total, bill.currency)}
); }