import { Text, Classes, Button, Intent, ButtonProps } from '@blueprintjs/core'; import clsx from 'classnames'; import { css } from '@emotion/css'; import { lighten } from 'polished'; import { Box, Group, Stack } from '@/components'; import styles from './PaymentPortal.module.scss'; export interface PaymentPageProps { // # Company name companyLogoUri: string; organizationName: string; organizationAddress: string; // # Colors primaryColor?: string; // # Customer name customerName: string; customerAddress?: string; // # Subtotal subtotal: string; subtotalLabel?: string; // # Total total: string; totalLabel?: string; // # Due date dueDate: string; // # Paid amount paidAmount: string; paidAmountLabel?: string; // # Due amount dueAmount: string; dueAmountLabel?: string; // # Download invoice button downloadInvoiceBtnLabel?: string; downloadInvoiceButtonProps?: Partial; // # View invoice button viewInvoiceLabel?: string; viewInvoiceButtonProps?: Partial; // # Invoice number invoiceNumber: string; invoiceNumberLabel?: string; // # Pay button showPayButton?: boolean; payButtonLabel?: string; payInvoiceButtonProps?: Partial; // # Buy note buyNote?: string; // # Copyright copyrightText?: string; classNames?: Record } export function InvoicePaymentPage({ // # Company companyLogoUri, organizationName, organizationAddress, // # Colors primaryColor = 'rgb(0, 82, 204)', // # Customer customerName, customerAddress, // # Subtotal subtotal, subtotalLabel = 'Subtotal', // # Total total, totalLabel = 'Total', // # Due date dueDate, // # Paid amount paidAmount, paidAmountLabel = 'Paid Amount (-)', // # Invoice number invoiceNumber, invoiceNumberLabel = 'Invoice #', // # Download invoice button downloadInvoiceBtnLabel = 'Download Invoice', downloadInvoiceButtonProps, // # View invoice button viewInvoiceLabel = 'View Invoice', viewInvoiceButtonProps, // # Due amount dueAmount, dueAmountLabel = 'Due Amount', // # Pay button showPayButton = true, payButtonLabel = 'Pay {total}', payInvoiceButtonProps, // # Buy note buyNote = 'By confirming your payment, you allow Bigcapital Technology, Inc. to charge you for this payment and save your payment information in accordance with their terms.', // # Copyright copyrightText = `© 2024 Bigcapital Technology, Inc.
All rights reserved.`, classNames, }: PaymentPageProps) { return ( {companyLogoUri && ( )} {organizationName}

{organizationName} Sent an Invoice for {total}

Invoice due {dueDate}{' '}
{customerName} {customerAddress && ( )}

{invoiceNumberLabel} {invoiceNumber}

{subtotalLabel} {subtotal} {totalLabel} {total} {/* {sharableLinkMeta?.taxes?.map((tax, key) => ( {tax?.name} {tax?.taxRateAmountFormatted} ))} */} {paidAmountLabel} {paidAmount} {dueAmountLabel} {dueAmount}
{showPayButton && ( )} {buyNote && ( {buyNote} )}
{copyrightText && ( )}
); }