import type { PropsWithChildren, ReactElement, ReactNode } from 'react'; import type { DataTableColumnDef, DataTableRowData } from '../../public.api.js'; /** * Props for the `DataTableCellActions` component. * @public */ export interface DataTableCellActionsProps { /** * Content for the cell actions. * Should be a `TableActionsMenu` directly or a function returning one. */ children: DataTableCellActionsContent; /** * Column ID that the given cell actions apply to. When a function is provided, it receives a * column ID and must return a boolean whether the action should be applied to that column. * If left empty, the actions apply to all cells in columns that allow cell actions. */ column?: string | ((columnId: string) => boolean); } /** * Type for the content of a DataTableCellAction. * @public */ export type DataTableCellActionsContent = ReactNode | ((props: { columnDef: DataTableColumnDef; cellValue: unknown; row: TData; rowId: string; }) => ReactElement); /** * Type for the cell actions collected from the table configuration. * `column` is the extracted column prop of the CellActions slot component * and `action` is the content. * @internal */ export type CollectedCellActions = Array<{ column?: string | ((id: string) => boolean); action: DataTableCellActionsContent; }>; /** * The slot component for defining cell actions within the DataTable. * @public */ export declare function DataTableCellActions(props: DataTableCellActionsProps): null; /** * Typeguard function that will check if a ReactNode is of type DataTableCellActions. * @internal */ export declare function isDataTableCellActions(child: ReactNode): child is ReactElement>;