import { Key, ReactElement, ReactNode } from "react";
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
type Maybe<T> = T | undefined | null;
interface Column<TRow, TSummaryRow = unknown> {
  /** The name of the column. Displayed in the header cell by default */
  readonly name: string | ReactElement;
  /** A unique key to distinguish each column */
  readonly key: string;
  /**
   * Column width. If not specified, it will be determined automatically based on grid width and specified widths of other columns
   * @default 'auto'
   */
  readonly width?: Maybe<number | string>;
  /**
   * Minimum column width in pixels
   * @default 50
   */
  readonly minWidth?: Maybe<number>;
  /** Maximum column width in pixels */
  readonly maxWidth?: Maybe<number>;
  /** Class name(s) for cells */
  readonly cellClass?: Maybe<string | ((row: TRow) => Maybe<string>)>;
  /** Class name(s) for the header cell */
  readonly headerCellClass?: Maybe<string>;
  /** Class name(s) for summary cells */
  readonly summaryCellClass?: Maybe<string | ((row: TSummaryRow) => Maybe<string>)>;
  /** Render function to render the content of cells */
  readonly renderCell?: Maybe<(props: RenderCellContentProps<TRow, TSummaryRow>) => ReactNode>;
  /** Render function to render the content of the header cell */
  readonly renderHeaderCell?: Maybe<(props: RenderHeaderCellContentProps<TRow, TSummaryRow>) => ReactNode>;
  /** Render function to render the content of summary cells */
  readonly renderSummaryCell?: Maybe<(props: RenderSummaryCellContentProps<TSummaryRow, TRow>) => ReactNode>;
  /** Render function to render the content of group cells */
  readonly renderGroupCell?: Maybe<(props: RenderGroupCellContentProps<TRow, TSummaryRow>) => ReactNode>;
  /** Render function to render the content of edit cells. When set, the column is automatically set to be editable */
  readonly renderEditCell?: Maybe<(props: RenderEditCellContentProps<TRow, TSummaryRow>) => ReactNode>;
  /** Control whether cells can be edited with `renderEditCell` */
  readonly editable?: Maybe<boolean | ((row: TRow) => boolean)>;
  /**
   * Returns the number of columns that the cell spans, or `undefined` for no spanning.
   * The span is clamped to the start-frozen, unfrozen, or end-frozen columns, whichever the column is part of.
   */
  readonly colSpan?: Maybe<(args: ColSpanArgs<TRow, TSummaryRow>) => Maybe<number>>;
  /** Determines whether the column is frozen, and on which edge.
   *  `true` is an alias for `'start'` for backward compatibility. */
  readonly frozen?: Maybe<ColumnFrozen | true>;
  /** Enable resizing of the column */
  readonly resizable?: Maybe<boolean>;
  /** Enable sorting of the column */
  readonly sortable?: Maybe<boolean>;
  /** Enable dragging of the column */
  readonly draggable?: Maybe<boolean>;
  /** Sets the column sort order to be descending instead of ascending the first time the column is sorted */
  readonly sortDescendingFirst?: Maybe<boolean>;
  /** Options for cell editing */
  readonly editorOptions?: Maybe<{
    /**
     * Render the cell content in addition to the edit cell content.
     * Enable this option when the editor is rendered outside the grid, like a modal for example.
     * By default, the cell content is not rendered when the edit cell is open.
     * @default false
     */
    readonly displayCellContent?: Maybe<boolean>;
    /**
     * Commit changes when clicking outside the cell
     * @default true
     */
    readonly commitOnOutsideClick?: Maybe<boolean>;
    /**
     * Close the editor when the row value changes externally
     * @default true
     */
    readonly closeOnExternalRowChange?: Maybe<boolean>;
  }>;
}
interface CalculatedColumn<TRow, TSummaryRow = unknown> extends Column<TRow, TSummaryRow> {
  /** The column group that contains the column, or `undefined` if the column is not in a group */
  readonly parent: CalculatedColumnParent<TRow, TSummaryRow> | undefined;
  /** The index of the column in the grid. Column groups are flattened and frozen columns are moved to their edge, so it can differ from the column's index in `columns` */
  readonly idx: number;
  /** Header row level, counted from the bottom header row: always `0` for columns, and negative for column groups */
  readonly level: number;
  readonly width: number | string;
  readonly minWidth: number;
  readonly maxWidth: number | undefined;
  readonly resizable: boolean;
  readonly sortable: boolean;
  readonly draggable: boolean;
  readonly frozen: ColumnFrozen;
  readonly renderCell: (props: RenderCellContentProps<TRow, TSummaryRow>) => ReactNode;
  readonly renderHeaderCell: (props: RenderHeaderCellContentProps<TRow, TSummaryRow>) => ReactNode;
  /** Returns the number of columns that the cell spans: the clamped value returned by `colSpan`, or `1` */
  readonly getColSpan: (args: ColSpanArgs<TRow, TSummaryRow> | undefined) => number;
  readonly cellClass: Column<TRow, TSummaryRow>['cellClass'];
  readonly headerCellClass: Column<TRow, TSummaryRow>['headerCellClass'];
  readonly summaryCellClass: Column<TRow, TSummaryRow>['summaryCellClass'];
  readonly renderSummaryCell: Column<TRow, TSummaryRow>['renderSummaryCell'];
  readonly renderGroupCell: Column<TRow, TSummaryRow>['renderGroupCell'];
  readonly renderEditCell: Column<TRow, TSummaryRow>['renderEditCell'];
  readonly editable: Column<TRow, TSummaryRow>['editable'];
  readonly colSpan: Column<TRow, TSummaryRow>['colSpan'];
  readonly sortDescendingFirst: Column<TRow, TSummaryRow>['sortDescendingFirst'];
  readonly editorOptions: Column<TRow, TSummaryRow>['editorOptions'];
}
interface ColumnGroup<R, SR = unknown> {
  /** The name of the column group. It will be displayed in the header cell */
  readonly name: string | ReactElement;
  readonly headerCellClass?: Maybe<string>;
  readonly children: readonly ColumnOrColumnGroup<R, SR>[];
}
interface CalculatedColumnParent<R, SR> {
  readonly name: string | ReactElement;
  readonly parent: CalculatedColumnParent<R, SR> | undefined;
  readonly idx: number;
  readonly colSpan: number;
  readonly level: number;
  readonly headerCellClass?: Maybe<string>;
}
type ColumnOrColumnGroup<R, SR = unknown> = Column<R, SR> | ColumnGroup<R, SR>;
type CalculatedColumnOrColumnGroup<R, SR> = CalculatedColumnParent<R, SR> | CalculatedColumn<R, SR>;
interface Position {
  /** Column index, or `-1` for the whole row in `TreeDataGrid` */
  readonly idx: number;
  /** Row index: `0` is the first row, header rows and top summary rows have negative indexes, and bottom summary rows come after the last row */
  readonly rowIdx: number;
}
interface RenderCellContentProps<TRow, TSummaryRow = unknown> {
  column: CalculatedColumn<TRow, TSummaryRow>;
  row: TRow;
  rowIdx: number;
  isCellEditable: boolean;
  tabIndex: number;
  onRowChange: (row: TRow) => void;
}
interface RenderSummaryCellContentProps<TSummaryRow, TRow = unknown> {
  column: CalculatedColumn<TRow, TSummaryRow>;
  row: TSummaryRow;
  tabIndex: number;
}
interface RenderGroupCellContentProps<TRow, TSummaryRow = unknown> {
  column: CalculatedColumn<TRow, TSummaryRow>;
  /** The group row: its key, rows, expanded state, level, and ID */
  row: GroupRow<TRow>;
  tabIndex: number;
  /** Expands or collapses the group */
  toggleGroup: () => void;
}
interface RenderEditCellContentProps<TRow, TSummaryRow = unknown> {
  column: CalculatedColumn<TRow, TSummaryRow>;
  row: TRow;
  rowIdx: number;
  onRowChange: (row: TRow, commitChanges?: boolean) => void;
  onClose: (commitChanges?: boolean, shouldFocus?: boolean) => void;
}
interface RenderHeaderCellContentProps<TRow, TSummaryRow = unknown> {
  column: CalculatedColumn<TRow, TSummaryRow>;
  sortDirection: SortDirection | undefined;
  priority: number | undefined;
  tabIndex: number;
}
interface BaseRenderCellProps<TRow, TSummaryRow = unknown> extends Omit<React.ComponentProps<'div'>, 'children'>, Pick<DataGridProps<TRow, TSummaryRow>, 'onCellMouseDown' | 'onCellClick' | 'onCellDoubleClick' | 'onCellContextMenu'> {
  rowIdx: number;
  setActivePosition: (position: Position, options?: SetActivePositionOptions) => void;
}
interface RenderCellProps<TRow, TSummaryRow> extends BaseRenderCellProps<TRow, TSummaryRow> {
  column: CalculatedColumn<TRow, TSummaryRow>;
  row: TRow;
  colSpan: number;
  isDraggedOver: boolean;
  isCellActive: boolean;
  onRowChange: (column: CalculatedColumn<TRow, TSummaryRow>, rowIdx: number, newRow: TRow) => void;
}
interface EditCellProps<R, SR> extends Pick<RenderCellProps<R, SR>, 'column' | 'row' | 'rowIdx'> {
  onRowChange: (row: R, commitChanges: boolean, shouldFocus: boolean) => void;
  closeEditor: (shouldFocus: boolean) => void;
  navigate: (event: React.KeyboardEvent<HTMLDivElement>) => void;
  onKeyDown: Maybe<(args: EditCellKeyDownArgs<R, SR>, event: CellKeyboardEvent) => void>;
}
type CellEvent<E extends React.SyntheticEvent<HTMLDivElement>> = E & {
  /** Prevents the default grid behavior for this event */
  preventGridDefault: () => void;
  /** Returns whether `preventGridDefault` was called */
  isGridDefaultPrevented: () => boolean;
};
type CellMouseEvent = CellEvent<React.MouseEvent<HTMLDivElement>>;
type CellKeyboardEvent = CellEvent<React.KeyboardEvent<HTMLDivElement>>;
type CellClipboardEvent = React.ClipboardEvent<HTMLDivElement>;
interface CellMouseArgs<TRow, TSummaryRow = unknown> {
  /** The column object of the cell. */
  column: CalculatedColumn<TRow, TSummaryRow>;
  /** The row object of the cell. */
  row: TRow;
  /** The row index of the cell. */
  rowIdx: number;
  /** Sets the active position to the cell. Pass `{ enableEditor: true }` to open its editor, or `{ shouldFocus: true }` to also focus it. */
  setActivePosition: (options?: SetActivePositionOptions) => void;
}
interface ActiveCellKeyDownArgs<TRow, TSummaryRow = unknown, TActiveRow = TRow> {
  mode: 'ACTIVE';
  /**
   * column object of the active position,
   * undefined if the active position is a row instead of a cell
   */
  column: CalculatedColumn<TRow, TSummaryRow> | undefined;
  /** The active row. In `TreeDataGrid`, it can be a `GroupRow`, see `isGroupRow` */
  row: TActiveRow;
  rowIdx: number;
  setActivePosition: (position: Position, options?: SetActivePositionOptions) => void;
}
interface EditCellKeyDownArgs<TRow, TSummaryRow = unknown> {
  mode: 'EDIT';
  column: CalculatedColumn<TRow, TSummaryRow>;
  row: TRow;
  rowIdx: number;
  navigate: () => void;
  onClose: (commitChanges?: boolean, shouldFocus?: boolean) => void;
}
/**
 * @typeParam TActiveRow - The type of the active row in `ACTIVE` mode, `TRow | GroupRow<TRow>` in `TreeDataGrid`
 */
type CellKeyDownArgs<TRow, TSummaryRow = unknown, TActiveRow = TRow> = ActiveCellKeyDownArgs<TRow, TSummaryRow, TActiveRow> | EditCellKeyDownArgs<TRow, TSummaryRow>;
/**
 * @typeParam TActiveRow - The type of the active row, `TRow | GroupRow<TRow>` in `TreeDataGrid`
 */
interface PositionChangeArgs<TRow, TSummaryRow = unknown, TActiveRow = TRow> {
  /** row index of the active position */
  rowIdx: number;
  /**
   * row object of the active position,
   * undefined if the active position is on a header or summary row.
   * In `TreeDataGrid`, it can be a `GroupRow`, see `isGroupRow`
   */
  row: TActiveRow | undefined;
  /**
   * column object of the active position,
   * undefined if the active position is a row instead of a cell
   */
  column: CalculatedColumn<TRow, TSummaryRow> | undefined;
}
/** The arguments of `TreeDataGrid`'s `onCellKeyDown`, whose active row can be a `GroupRow` */
type TreeCellKeyDownArgs<TRow, TSummaryRow = unknown> = CellKeyDownArgs<TRow, TSummaryRow, TRow | GroupRow<TRow>>;
/** The arguments of `TreeDataGrid`'s `onActivePositionChange`, whose row can be a `GroupRow` */
type TreePositionChangeArgs<TRow, TSummaryRow = unknown> = PositionChangeArgs<TRow, TSummaryRow, TRow | GroupRow<TRow>>;
type CellMouseEventHandler<R, SR> = Maybe<(args: CellMouseArgs<NoInfer<R>, NoInfer<SR>>, event: CellMouseEvent) => void>;
type MapViewportColumns<TRow, TSummaryRow> = <T>(activeIdx: number | undefined, colSpanArgs: ColSpanArgs<TRow, TSummaryRow> | undefined, callback: (column: CalculatedColumn<TRow, TSummaryRow>, isCellActive: boolean, colSpan: number, index: number) => T) => T[];
interface BaseRenderRowProps<TRow, TSummaryRow = unknown> extends BaseRenderCellProps<TRow, TSummaryRow> {
  /**
   * Calls `callback` for each cell to render in the row, and returns the results.
   * `activeIdx` is the column index of the row's active cell, if any: that cell is rendered even when it is scrolled out of view.
   * If virtualization would leave out the active row, it is rendered with only its active cell, if any.
   * `colSpanArgs` is passed to `column.colSpan`, and the columns that a cell spans are skipped, even the active one.
   * The callback receives the cell's column, whether the cell is active, its `colSpan`, and its index in the results.
   */
  mapViewportColumns: MapViewportColumns<TRow, TSummaryRow>;
  rowIdx: number;
  activeCellIdx: number | undefined;
  isRowSelectionDisabled: boolean;
  isRowSelected: boolean;
  gridRowStart: number;
}
interface RenderRowProps<TRow, TSummaryRow = unknown> extends BaseRenderRowProps<TRow, TSummaryRow> {
  row: TRow;
  draggedOverCellIdx: number | undefined;
  activeCellEditor: ReactElement<EditCellProps<TRow, TSummaryRow>> | undefined;
  onRowChange: (column: CalculatedColumn<TRow, TSummaryRow>, rowIdx: number, newRow: TRow) => void;
  rowClass: Maybe<(row: TRow, rowIdx: number) => Maybe<string>>;
  isTreeGrid: boolean;
}
interface RowsChangeData<R, SR = unknown> {
  /** Indexes of the rows that changed */
  indexes: number[];
  /** The column of the cells that changed */
  column: CalculatedColumn<R, SR>;
}
interface SelectRowEvent<TRow> {
  row: TRow;
  checked: boolean;
  isShiftClick: boolean;
}
interface SelectHeaderRowEvent {
  checked: boolean;
}
interface FillEvent<TRow> {
  columnKey: string;
  sourceRow: TRow;
  targetRow: TRow;
}
interface CellCopyPasteArgs<TRow, TSummaryRow = unknown> {
  column: CalculatedColumn<TRow, TSummaryRow>;
  row: TRow;
}
type CellCopyArgs<TRow, TSummaryRow = unknown> = CellCopyPasteArgs<TRow, TSummaryRow>;
type CellPasteArgs<TRow, TSummaryRow = unknown> = CellCopyPasteArgs<TRow, TSummaryRow>;
interface GroupRow<TRow> {
  /** The rows of the group, including the rows of its subgroups */
  readonly childRows: readonly TRow[];
  /** The group's ID, returned by `getGroupId` */
  readonly id: string;
  /** The ID of the parent group, or `undefined` on the first level */
  readonly parentId: string | undefined;
  /** The group's key, returned by `getRowGroupKey` */
  readonly groupKey: string;
  /** Whether the group is expanded, i.e., its ID is in `expandedGroupIds` */
  readonly isExpanded: boolean;
  /** The nesting level, `0` for the first level */
  readonly level: number;
  /** The position of the group among its sibling groups, `0` for the first one */
  readonly posInSet: number;
  /** The number of sibling groups, including this one */
  readonly setSize: number;
  /** The index of the group row among all the rows, counting every group as expanded */
  readonly startRowIndex: number;
}
interface SortColumn {
  readonly columnKey: string;
  readonly direction: SortDirection;
}
type ColumnFrozen = false | 'start' | 'end';
type SortDirection = 'ASC' | 'DESC';
type ColSpanArgs<TRow, TSummaryRow> = {
  readonly type: 'HEADER';
} | {
  readonly type: 'ROW';
  readonly row: TRow;
} | {
  readonly type: 'SUMMARY';
  readonly row: TSummaryRow;
};
type RowHeightArgs<TRow> = {
  type: 'ROW';
  row: TRow;
} | {
  type: 'GROUP';
  row: GroupRow<TRow>;
};
interface RenderSortIconProps {
  /** The sort direction of the column, or `undefined` if it is not sorted */
  sortDirection: SortDirection | undefined;
}
interface RenderSortPriorityProps {
  /** The column's position in `sortColumns`, starting at 1, when sorting by multiple columns, or `undefined` otherwise */
  priority: number | undefined;
}
interface RenderSortStatusProps extends RenderSortIconProps, RenderSortPriorityProps {}
interface RenderCheckboxProps {
  /** Whether the checkbox is checked */
  checked?: boolean | undefined;
  /** Whether the checkbox is in an indeterminate state, like the select all checkbox when only some rows are selected */
  indeterminate?: boolean | undefined;
  /** Whether the checkbox is disabled */
  disabled?: boolean | undefined;
  /** Called when the checkbox is toggled. `shift` is `true` if the Shift key was held, to select a range of rows */
  onChange: (checked: boolean, shift: boolean) => void;
  /** `0` when the checkbox's cell is active and `-1` otherwise, so the grid can move focus from the cell to the checkbox */
  tabIndex?: number | undefined;
  /** Accessible label for the checkbox */
  'aria-label'?: string | undefined;
  /** ID of the element that labels the checkbox */
  'aria-labelledby'?: string | undefined;
}
interface Renderers<TRow, TSummaryRow> {
  readonly renderCell?: Maybe<(key: Key, props: RenderCellProps<TRow, TSummaryRow>) => ReactNode>;
  readonly renderCheckbox?: Maybe<(props: RenderCheckboxProps) => ReactNode>;
  readonly renderRow?: Maybe<(key: Key, props: RenderRowProps<TRow, TSummaryRow>) => ReactNode>;
  readonly renderSortStatus?: Maybe<(props: RenderSortStatusProps) => ReactNode>;
  readonly noRowsFallback?: Maybe<ReactNode>;
}
interface SetActivePositionOptions {
  enableEditor?: Maybe<boolean>;
  shouldFocus?: Maybe<boolean>;
}
interface ColumnWidth {
  /** `'resized'` if the user resized the column, or `'measured'` if the grid measured it */
  readonly type: 'resized' | 'measured';
  /** The width in pixels */
  readonly width: number;
}
type ColumnWidths = ReadonlyMap<string, ColumnWidth>;
type Direction = 'ltr' | 'rtl';
export declare function useRowSelection(): {
  isRowSelectionDisabled: boolean;
  isRowSelected: boolean;
  onRowSelectionChange: (selectRowEvent: SelectRowEvent<any>) => void;
};
export declare function useHeaderRowSelection(): {
  isIndeterminate: boolean;
  isRowSelected: boolean;
  onRowSelectionChange: (selectRowEvent: SelectHeaderRowEvent) => void;
};
interface PartialPosition {
  readonly idx?: Maybe<number>;
  readonly rowIdx?: Maybe<number>;
}
type DefaultColumnOptions<R, SR> = Pick<Column<R, SR>, 'renderCell' | 'renderHeaderCell' | 'width' | 'minWidth' | 'maxWidth' | 'resizable' | 'sortable' | 'draggable'>;
interface DataGridHandle {
  element: HTMLDivElement | null;
  scrollToCell: (position: PartialPosition) => void;
  setActivePosition: (position: Position, options?: SetActivePositionOptions) => void;
}
type SharedDivProps = Pick<React.ComponentProps<'div'>, 'role' | 'aria-label' | 'aria-labelledby' | 'aria-description' | 'aria-describedby' | 'aria-rowcount' | 'className' | 'style' | 'onScroll'>;
interface DataGridProps<R, SR = unknown, K extends Key = Key> extends SharedDivProps {
  ref?: Maybe<React.Ref<DataGridHandle>>;
  /**
   * Grid and data props
   */
  /** An array of column definitions */
  columns: readonly ColumnOrColumnGroup<NoInfer<R>, NoInfer<SR>>[];
  /** An array of rows, which can be of any type */
  rows: readonly R[];
  /** Rows pinned at the top of the grid for summary purposes */
  topSummaryRows?: Maybe<readonly SR[]>;
  /** Rows pinned at the bottom of the grid for summary purposes */
  bottomSummaryRows?: Maybe<readonly SR[]>;
  /**
   * Function to get the key of each row.
   * Required for row selection.
   * Recommended otherwise, as the key is also used as the `key` prop of the row elements.
   * @returns a unique key for the row
   */
  getRowKey?: Maybe<(row: NoInfer<R>) => K>;
  /** Callback triggered when rows are changed */
  onRowsChange?: Maybe<(rows: NoInfer<R>[], data: RowsChangeData<NoInfer<R>, NoInfer<SR>>) => void>;
  /**
   * Dimensions props
   */
  /**
   * Height of each row in pixels
   * @default 35
   */
  rowHeight?: Maybe<number | ((row: NoInfer<R>) => number)>;
  /**
   * Height of the header row in pixels
   * @default `rowHeight` when it is a number, otherwise 35
   */
  headerRowHeight?: Maybe<number>;
  /**
   * Height of each summary row in pixels
   * @default `rowHeight` when it is a number, otherwise 35
   */
  summaryRowHeight?: Maybe<number>;
  /** A map of column widths */
  columnWidths?: Maybe<ColumnWidths>;
  /** Callback triggered when column widths change */
  onColumnWidthsChange?: Maybe<(columnWidths: ColumnWidths) => void>;
  /**
   * Feature props
   */
  /** A set of selected row keys */
  selectedRows?: Maybe<ReadonlySet<K>>;
  /** Function to determine if row selection is disabled for a specific row */
  isRowSelectionDisabled?: Maybe<(row: NoInfer<R>) => boolean>;
  /** Callback triggered when the selection changes */
  onSelectedRowsChange?: Maybe<(selectedRows: Set<NoInfer<K>>) => void>;
  /** An array of sorted columns */
  sortColumns?: Maybe<readonly SortColumn[]>;
  /** Callback triggered when sorting changes */
  onSortColumnsChange?: Maybe<(sortColumns: SortColumn[]) => void>;
  /** Default options applied to all columns */
  defaultColumnOptions?: Maybe<DefaultColumnOptions<NoInfer<R>, NoInfer<SR>>>;
  /**
   * Event props
   */
  /** Callback triggered when a pointer becomes active in a cell */
  onCellMouseDown?: CellMouseEventHandler<R, SR>;
  /** Callback triggered when a cell is clicked */
  onCellClick?: CellMouseEventHandler<R, SR>;
  /** Callback triggered when a cell is double-clicked */
  onCellDoubleClick?: CellMouseEventHandler<R, SR>;
  /** Callback triggered when a cell is right-clicked */
  onCellContextMenu?: CellMouseEventHandler<R, SR>;
  /** Callback triggered when a key is pressed in a cell */
  onCellKeyDown?: Maybe<(args: CellKeyDownArgs<NoInfer<R>, NoInfer<SR>>, event: CellKeyboardEvent) => void>;
  /** Callback triggered when a cell's content is copied */
  onCellCopy?: Maybe<(args: CellCopyArgs<NoInfer<R>, NoInfer<SR>>, event: CellClipboardEvent) => void>;
  /** Callback triggered when content is pasted into a cell */
  onCellPaste?: Maybe<(args: CellPasteArgs<NoInfer<R>, NoInfer<SR>>, event: CellClipboardEvent) => NoInfer<R>>;
  /** Function called whenever the active position is changed */
  onActivePositionChange?: Maybe<(args: PositionChangeArgs<NoInfer<R>, NoInfer<SR>>) => void>;
  /** Callback triggered when a column is resized */
  onColumnResize?: Maybe<(column: CalculatedColumn<R, SR>, width: number) => void>;
  /** Callback triggered when columns are reordered */
  onColumnsReorder?: Maybe<(sourceColumnKey: string, targetColumnKey: string) => void>;
  /** Callback triggered when the value of the active cell is dragged to fill other cells */
  onFill?: Maybe<(event: FillEvent<NoInfer<R>>) => NoInfer<R>>;
  /**
   * Toggles and modes
   */
  /** @default true */
  enableVirtualization?: Maybe<boolean>;
  /**
   * Miscellaneous
   */
  /** Custom renderers for cells, rows, and other components */
  renderers?: Maybe<Renderers<NoInfer<R>, NoInfer<SR>>>;
  /** Function to apply custom class names to rows */
  rowClass?: Maybe<(row: NoInfer<R>, rowIdx: number) => Maybe<string>>;
  /** Custom class name for the header row */
  headerRowClass?: Maybe<string>;
  /**
   * Text direction of the grid ('ltr' or 'rtl')
   * @default 'ltr'
   */
  direction?: Maybe<Direction>;
  'data-testid'?: Maybe<string>;
  'data-cy'?: Maybe<string>;
}
/**
 * Main API component to render a data grid of rows and columns
 *
 * @example
 *
 * <DataGrid columns={columns} rows={rows} />
 */
export declare function DataGrid<R, SR = unknown, K extends Key = Key>(props: DataGridProps<R, SR, K>): import("react").JSX.Element;
interface TreeDataGridProps<R, SR = unknown, K extends Key = Key> extends Omit<DataGridProps<R, SR, K>, 'columns' | 'role' | 'aria-rowcount' | 'rowHeight' | 'onFill' | 'isRowSelectionDisabled' | 'onCellKeyDown' | 'onActivePositionChange'> {
  columns: readonly Column<NoInfer<R>, NoInfer<SR>>[];
  rowHeight?: Maybe<number | ((args: RowHeightArgs<NoInfer<R>>) => number)>;
  /** Callback triggered when a key is pressed in a cell or a row, including group rows */
  onCellKeyDown?: Maybe<(args: TreeCellKeyDownArgs<NoInfer<R>, NoInfer<SR>>, event: CellKeyboardEvent) => void>;
  /** Function called whenever the active position is changed, including to a group row */
  onActivePositionChange?: Maybe<(args: TreePositionChangeArgs<NoInfer<R>, NoInfer<SR>>) => void>;
  groupBy: readonly string[];
  getRowGroupKey?: Maybe<(row: NoInfer<R>, columnKey: string) => string>;
  expandedGroupIds: ReadonlySet<string>;
  onExpandedGroupIdsChange: (expandedGroupIds: Set<string>) => void;
  getGroupId?: Maybe<(groupKey: string, parentId?: string) => string>;
}
/**
 * Returns whether a row of a `TreeDataGrid` is a group row,
 * e.g., the active row passed to `onCellKeyDown` or `onActivePositionChange`
 */
export declare function isGroupRow<TRow>(row: TRow | GroupRow<TRow>): row is GroupRow<TRow>;
export declare function TreeDataGrid<R, SR = unknown, K extends Key = Key>({ columns: rawColumns, rows: rawRows, rowHeight: rawRowHeight, getRowKey: rawGetRowKey, onCellKeyDown: rawOnCellKeyDown, onCellCopy: rawOnCellCopy, onCellPaste: rawOnCellPaste, onRowsChange, selectedRows: rawSelectedRows, onSelectedRowsChange: rawOnSelectedRowsChange, renderers, groupBy: rawGroupBy, getRowGroupKey: rawGetRowGroupKey, expandedGroupIds, onExpandedGroupIdsChange, getGroupId: rawGetGroupId, ...props }: TreeDataGridProps<R, SR, K>): import("react").JSX.Element;
export declare const DataGridRenderersContext: import("react").Context<Maybe<Renderers<any, any>>>;
declare const MemoRow: <R, SR>(props: RenderRowProps<R, SR>) => React.JSX.Element;
declare const MemoCell: <R, SR>(props: RenderCellProps<R, SR>) => React.JSX.Element;
export declare const SELECT_COLUMN_KEY = "rdg-select-column";
export declare const SelectColumn: Column<any, any>;
export declare function renderCheckbox({ onChange, indeterminate, ...props }: RenderCheckboxProps): import("react").JSX.Element;
export declare function renderToggleGroup<R, SR>(props: RenderGroupCellContentProps<R, SR>): import("react").JSX.Element;
export declare function ToggleGroup<R, SR>({ row, tabIndex, toggleGroup }: RenderGroupCellContentProps<R, SR>): import("react").JSX.Element;
export declare function renderValue<R, SR>(props: RenderCellContentProps<R, SR>): React.ReactNode;
export interface SelectCheckboxProps extends RenderCheckboxProps {
  /** Whether the checkbox is checked */
  checked: boolean;
}
export declare function SelectCheckbox(props: SelectCheckboxProps): import("react").ReactNode;
export declare function renderTextEditor<TRow, TSummaryRow>({ row, column, onRowChange, onClose }: RenderEditCellContentProps<TRow, TSummaryRow>): import("react").JSX.Element;
export declare function renderHeaderCell<R, SR>({ column, sortDirection, priority }: RenderHeaderCellContentProps<R, SR>): string | import("react").JSX.Element;
export declare function renderSortIcon({ sortDirection }: RenderSortIconProps): import("react").JSX.Element | null;
export declare function renderSortPriority({ priority }: RenderSortPriorityProps): number | undefined;
export { type CalculatedColumn, type CalculatedColumnOrColumnGroup, type CalculatedColumnParent, MemoCell as Cell, type CellCopyArgs, type CellKeyDownArgs, type CellKeyboardEvent, type CellMouseArgs, type CellMouseEvent, type CellPasteArgs, type ColSpanArgs, type Column, type ColumnFrozen, type ColumnGroup, type ColumnOrColumnGroup, type ColumnWidth, type ColumnWidths, type DataGridHandle, type DataGridProps, type DefaultColumnOptions, type Direction, type FillEvent, type GroupRow, type PositionChangeArgs, type RenderCellContentProps, type RenderCellProps, type RenderCheckboxProps, type RenderEditCellContentProps, type RenderGroupCellContentProps, type RenderHeaderCellContentProps, type RenderRowProps, type RenderSortIconProps, type RenderSortPriorityProps, type RenderSortStatusProps, type RenderSummaryCellContentProps, type Renderers, MemoRow as Row, type RowHeightArgs, type RowsChangeData, type SelectHeaderRowEvent, type SelectRowEvent, type SetActivePositionOptions, type SortColumn, type SortDirection, type TreeCellKeyDownArgs, type TreeDataGridProps, type TreePositionChangeArgs };
//# sourceMappingURL=index.d.ts.map