import { type TableSort } from 'ionbase-ui'; export type InvoiceStatus = 'paid' | 'open' | 'overdue'; export type InvoiceColumn = 'customer' | 'amount' | 'due'; export interface Invoice { id: string; customer: string; /** In cents, so sums are exact. */ amount: number; status: InvoiceStatus; /** ISO date. */ due: string; } /** The listing: everything the address holds, and all the server needs. */ export interface InvoiceQuery { search: string; statuses: InvoiceStatus[]; sort: TableSort; page: number; pageSize: number; } export interface InvoicePage { rows: Invoice[]; /** Every invoice the query matches, on every page. */ total: number; } /** What a bulk action reaches: ticked ids, or every match but the unticked. */ export type InvoiceTargets = { ids: string[]; } | { query: InvoiceQuery; except: string[]; }; /** * Read defensively: an address is typed, pasted and kept for months. A value * that means nothing now (a status since renamed, page "abc") falls back to * its default, never to an error page. */ export declare function readQuery(params: string): InvoiceQuery; /** A value at its default is left out, so the plain address is the default view. */ export declare function writeQuery(q: InvoiceQuery): string; export declare function InvoicesListing({ fetchInvoices, onRemind, }: { fetchInvoices: (query: InvoiceQuery, signal: AbortSignal) => Promise; onRemind?: (targets: InvoiceTargets) => void; }): import("react").JSX.Element;