import { ReactNode } from 'react'; import { ColumnDef, SortState } from '../../dataListTable/types'; import { InvoicingKpiCard } from './InvoicingKpiCard'; export type { InvoicingKpiCard } from './InvoicingKpiCard'; export interface InvoicingListTab { id: string; label: string; count?: number; } export interface InvoicingListScaffoldProps { columns: ColumnDef[]; data: TData[]; emptyMessage: string; hasMore: boolean; isLoading: boolean; isLoadingMore: boolean; searchValue: string; title: string; activeTab?: string; /** Show a spinner on the status-tab counts while the counts fetch is in flight. */ countsLoading?: boolean; /** * Rich zero-state (illustration + copy + actions) shown when the list is empty * and the user is not searching. Falls back to `emptyMessage` text when absent * or while a search query is active. */ emptyState?: ReactNode; kpis?: InvoicingKpiCard[]; /** Show the shimmer KPI strip while the (separate) KPI fetch is in flight. */ kpisLoading?: boolean; primaryActionLabel?: string; searchPlaceholder?: string; /** Show the NavBar bottom border. Off for list pages; on for the audit log. */ showNavBorderBottom?: boolean; /** * Controlled (server-driven) sort. When `onSortChange` is provided the scaffold * stops sorting the loaded page itself and instead reflects `sortState` and * forwards header clicks to the connector, which re-fetches from the backend in * the requested order. When omitted, the scaffold falls back to client-side * sorting of the loaded rows via each column's `getSortValue`. */ sortState?: SortState | null; /** Add 32px top/bottom padding around the table (used by the audit log). */ tableVerticalPadding?: boolean; tabs?: InvoicingListTab[]; getRowId: (row: TData) => string; onLoadMore: () => void; onSearchChange: (value: string) => void; onPrimaryAction?: () => void; onSortChange?: (next: SortState | null) => void; onTabChange?: (tabId: string) => void; /** Sticky right-rail overflow menu per row (enables DataListTable `rowMenu`). */ renderRowMenu?: (row: TData, rowIndex: number) => ReactNode; } /** * Shared scaffold for invoicing list pages: header (title + reused * `ListPageSearchInputBox` + optional `Button`), optional KPI strip, optional * `TabSwitcher` status tabs, and a `DataListTable` with cursor-based infinite * loading. Domain pages only supply columns, KPI cards and tabs, so every * invoicing list reuses the same web-components primitives. */ export declare function InvoicingListScaffold({ activeTab, columns, data, emptyMessage, emptyState, getRowId, hasMore, isLoading, isLoadingMore, kpis, kpisLoading, countsLoading, primaryActionLabel, searchPlaceholder, searchValue, showNavBorderBottom, tableVerticalPadding, sortState: controlledSortState, tabs, title, onLoadMore, onPrimaryAction, onSearchChange, onSortChange, onTabChange, renderRowMenu, }: Readonly>): import("react/jsx-runtime").JSX.Element; export default InvoicingListScaffold;