import { Action } from '@judo/actions'; import { ConfirmDialogOptions } from '@judo/feedback'; import { ActionDefinition, Button as ButtonElement, Column, PageDefinition } from '@judo/model-api'; import { GridFilterModel, GridPaginationModel, GridSortModel } from '@mui/x-data-grid'; import { Dispatch, SetStateAction } from 'react'; export interface TableToolbarProps { buttons: ButtonElement[]; testId: string; page?: PageDefinition; hasSelection: boolean; /** Whether this toolbar belongs to an eager table (aggregated element) */ isEager?: boolean; /** Action dispatcher function (second arg = context overrides, e.g. selectedRows) */ onDispatch?: (action: Action, contextOverrides?: Record) => Promise; /** Currently selected row transfers for bulk operations */ selectedRows?: unknown[]; /** Setter for the filter button element, used to anchor the filter panel */ setFilterButtonEl?: Dispatch>; /** Current sort model from DataGrid */ sortModel?: GridSortModel; /** Current filter model from DataGrid */ filterModel?: GridFilterModel; /** Current pagination model from DataGrid */ paginationModel?: GridPaginationModel; /** Table columns for filter conversion */ columns?: Column[]; /** Pre-computed mask string to include in refresh queryCustomizer */ mask?: string; /** Whether to count records (for pagination display) */ showTotalCount?: boolean; /** Callback to refresh the table after a destructive bulk action (e.g., bulk delete) */ onAfterBulkDelete?: () => void; /** Callback for lazy bulk remove with per-item progress dialog */ onBulkRemoveWithProgress?: (selectedRows: unknown[], actionDefinition: ActionDefinition) => Promise; /** Optional confirmation function for destructive actions */ confirm?: (options: ConfirmDialogOptions) => Promise; } declare module "@mui/x-data-grid" { interface ToolbarPropsOverrides extends TableToolbarProps { } } /** * Custom toolbar component for table actions. * Filters buttons by page actions and bulk action requirements. * Used as a DataGrid slots.toolbar component. * * Note: Uses Stack instead of GridToolbarContainer to avoid CSS import * issues in test environments while maintaining proper toolbar styling. */ export declare function TableToolbar({ buttons, testId, page, hasSelection, isEager, onDispatch, selectedRows, setFilterButtonEl, sortModel, filterModel, paginationModel, columns, mask, showTotalCount, onAfterBulkDelete, onBulkRemoveWithProgress, confirm, }: TableToolbarProps): import("react/jsx-runtime").JSX.Element | null; //# sourceMappingURL=TableToolbar.d.ts.map