import { x } from '@xstyled/emotion'; import { Group, Stack } from '@/components'; import { SendMailReceipt, SendMailReceiptProps, } from '../SendMailViewDrawer/SendMailViewReceiptPreview'; export interface EstimateSendMailReceiptProps extends SendMailReceiptProps { // # Company name. companyLogoUri?: string; companyName: string; // # Estimate number. estimateNumberLabel?: string; estimateNumber: string; // # Total. total: string; totalLabel?: string; // # Expiration date. expirationDateLabel?: string; expirationDate: string; // # Message. message: string; // # Estimate items. items?: Array<{ label: string; total: string; quantity: string | number }>; // # Subtotal subtotalLabel?: string; subtotal: string; // # View estimate button showViewEstimateButton?: boolean; viewEstimateButtonLabel?: string; viewEstimateButtonOnClick?: () => void; } export function EstimateSendMailReceipt({ // # Company name. companyLogoUri, companyName, // # Estimate number. estimateNumberLabel = 'Estimate #', estimateNumber, // # Total. total, totalLabel = 'Total', // # Expiration date. expirationDateLabel = 'Expiration Date', expirationDate, // # Message message, // # Items items, // # Subtotal subtotal, subtotalLabel = 'Subtotal', // # View estimate button showViewEstimateButton = true, viewEstimateButtonLabel = 'View Estimate', viewEstimateButtonOnClick, ...props }: EstimateSendMailReceiptProps) { return ( {companyLogoUri && } {companyName} {total} {estimateNumberLabel} {estimateNumber} {expirationDateLabel} {expirationDate} {message} {showViewEstimateButton && ( {viewEstimateButtonLabel} )} {items?.map((item, key) => ( {item.label} {item.quantity} x {item.total} ))} {subtotalLabel} {subtotal} {totalLabel} {total} ); }