import { type BookingPaymentScheduleRecord, type InvoiceRecord } from "../index.js"; export type InvoiceTypeChoice = "invoice" | "proforma"; export interface BookingInvoiceDialogUpload { storageKey: string; mimeType: string; fileSize: number; } export interface BookingInvoiceDueDateResolverInput { issueDate: string; dueDate: string; invoiceType: InvoiceTypeChoice; booking: { id: string; currency: string; amountCents: number | null; }; bookingPaymentSchedule: BookingPaymentScheduleRecord; } export type BookingInvoiceDueDateResolver = (input: BookingInvoiceDueDateResolverInput) => string; export interface BookingInvoiceDialogProps { open: boolean; onOpenChange: (open: boolean) => void; bookingId: string; /** Pre-fill the currency from the booking's sell currency. */ defaultCurrency?: string; /** Pre-fill subtotal/total from the booking's sell amount (in cents). */ defaultAmountCents?: number | null; /** * Upload a file's bytes to durable storage and return its location so * the dialog can attach it to the newly-created invoice. When omitted, * the attachments dropzone is hidden — the SmartBill-off branch can * still create the invoice, it just won't surface uploads. The * template owns the upload endpoint (e.g. `/api/v1/admin/uploads`) so the * dialog stays transport-agnostic. */ uploadFile?: (file: File) => Promise; /** * Tax % to pre-fill on the schedule-derived line item. The operator * template resolves this from the booking's primary product (e.g. via * `useBookingTaxPreview`) so the dialog mirrors the rate the server * would apply server-side at issuance. Defaults to 0 when omitted. */ defaultScheduleTaxRatePercent?: number; /** * Resolve the legal document due date when an invoice/proforma is * derived from a payment schedule. Defaults to the schedule due date * for backwards compatibility. */ resolveScheduleDueDate?: BookingInvoiceDueDateResolver; onSuccess?: (invoice: InvoiceRecord) => void; } /** * Modal invoice creator scoped to a single booking. Operators can pick * between a free-form ("custom") invoice and one derived from an * unpaid payment schedule (amounts + due date are locked to the * schedule). Toggles control whether the new invoice is pushed to * SmartBill on issue, whether a fully-paid `payments` row is created * alongside it, and (when sync is off) lets the operator attach * supporting documents. */ export declare function BookingInvoiceDialog({ open, onOpenChange, bookingId, defaultCurrency, // i18n-literal-ok domain default currency defaultAmountCents, uploadFile, defaultScheduleTaxRatePercent, resolveScheduleDueDate, onSuccess, }: BookingInvoiceDialogProps): import("react").JSX.Element;