import type { RefObject } from 'react';
import type { TableState } from '../subcomponents/table-provider/table-reducer.js';
import type { CellContext, ObjectSetTableConfig, SortDirection } from '../types.js';
import { SelectionManager } from './selection-manager.js';
import type { PrivateTableApiBase, SortingInfo } from './types.js';
declare class TableApi<TData> implements PrivateTableApiBase<TData> {
    private readonly tableRef;
    private readonly configRef;
    private readonly stateRef;
    readonly selection: SelectionManager<TData>;
    constructor(tableRef: RefObject<HTMLTableElement>, configRef: RefObject<ObjectSetTableConfig<TData>>, stateRef: RefObject<TableState<TData>>);
    _getConfig(): ObjectSetTableConfig<TData>;
    _getState(): TableState<TData>;
    _createCellContext(row: number, column: number): CellContext<TData>;
    /**
     * Returns the HTML table element
     *
     * @returns The HTML table element
     */
    getHTMLTable(): HTMLTableElement | null;
    /**
     * Returns the total number of rows in the table, including the empty rows
     *
     * @returns The total number of rows in the table
     */
    getTotalRowsCount(): number;
    /**
     * Checks if the cell at the given row and column can be edited
     *
     * @param row - The row index of the cell to check
     * @param column - The column index of the cell to check
     * @returns `true` if the cell can be edited, `false` otherwise
     */
    canEditCell(row: number, column: number): boolean;
    /**
     * Checks if the table is currently in cell edit mode
     *
     * @returns `true` if the table is in cell edit mode, `false` otherwise
     */
    isEditing(): boolean;
    /**
     * Checks if at least one column is editable
     *
     * @returns `true` if the table is editable, `false` otherwise
     */
    isEditable(): boolean;
    /**
     * Checks if the table is currently in cell edit mode for the given cell
     *
     * @param row - The row index of the cell to check
     * @param column - The column index of the cell to check
     * @returns `true` if the table is in cell edit mode for the given cell, `false` otherwise
     */
    isEditingCell(row: number, column: number): boolean;
    /**
     * Enters cell edit mode for the given cell
     *
     * @param row - The row index of the cell to enter edit mode
     * @param column - The column index of the cell to enter edit mode
     */
    enterCellEditMode(row: number, column: number): void;
    /**
     * Exits cell edit mode
     *
     * @param save - Whether to save the changes made in the cell
     */
    exitCellEditMode(save?: boolean): void;
    /**
     * Sorts the rows by the given column index and direction
     *
     * @param columnIndex - The index of the column to sort
     * @param direction - The direction to sort the rows. Null if the sorting should be removed
     */
    sortRows(columnIndex: number, direction: SortDirection | null): void;
    /**
     * Returns the sorting information.
     *
     * @returns The sorting information. `null` if no sorting is applied.
     *
     * @example
     * ```tsx
     * const sortingInfo = apiRef.current?.getCurrentSortInfo()
     * console.log(sortingInfo) // { columnIndex: 0, direction: 'asc' }
     * ```
     */
    getCurrentSortInfo(): SortingInfo | null;
}
export { TableApi };
//# sourceMappingURL=table-api.d.ts.map