"use client"; import * as React from "react"; import { cn } from "./lib/utils"; export interface PrintInvoiceLine { id: string; label: string; qty: number; price: number; } export interface PrintInvoiceProps extends React.HTMLAttributes { orderNo?: string; lines?: PrintInvoiceLine[]; } /** Printable invoice stub with dashed tear line and print trigger. */ export function PrintInvoice({ orderNo = "BB-2026-0481", lines = [ { id: "l1", label: "General Admission", qty: 2, price: 45 }, { id: "l2", label: "Balcony Upgrade", qty: 1, price: 20 }, ], className, ...props }: PrintInvoiceProps) { const total = lines.reduce((s, l) => s + l.qty * l.price, 0); return (
Invoice {orderNo}