import type { ColumnDef, DataType, IndexedData, ObjectSetTableConfig, SortDirection, SortState, TableCellIndex } from '../../table/types.js';
import type { UseFormReturn } from 'react-hook-form';
interface TableState<T extends DataType = DataType> {
    dispatch?: React.Dispatch<TableAction<T>>;
    defaultData: T[];
    columns: Array<ColumnDef<T>>;
    data: Array<IndexedData<T>>;
    dataFormReferences: Array<Array<React.RefObject<UseFormReturn> | null>>;
    allowRowSelection: boolean;
    showRowNumbers: boolean;
    selectedRowIndexes: number[];
    lastSelectedRowIndex: number | null;
    selectedRowErrors: string[] | null;
    selectedCellIndex: TableCellIndex | null;
    isCellEditMode: boolean;
    sortState: SortState | null;
}
type TableAction<T extends DataType = DataType> = {
    type: 'SET_DISPATCH';
    payload: React.Dispatch<TableAction<T>>;
} | {
    type: 'SET_COLUMNS';
    payload: Array<ColumnDef<T>>;
} | {
    type: 'SET_DATA';
    payload: T[];
    tableConfig?: ObjectSetTableConfig<T>;
} | {
    type: 'UPDATE_COLUMN';
    payload: {
        index: number;
        column: Partial<ColumnDef<T>>;
    };
} | {
    type: 'TOGGLE_SELECTED_ROW';
    payload: {
        index: number;
        clearOtherSelections?: boolean;
    };
} | {
    type: 'TOGGLE_SELECT_ALL_ROWS';
    payload: {
        totalRows?: number;
    };
} | {
    type: 'SELECT_ALL_ROWS';
    payload: {
        totalRows?: number;
    };
} | {
    type: 'SELECT_ROW_RANGE';
    payload: {
        from: number;
        to: number;
    };
} | {
    type: 'SELECT_CELL';
    payload: TableCellIndex | null;
} | {
    type: 'ENTER_CELL_EDIT_MODE';
    payload: TableCellIndex;
} | {
    type: 'SET_SELECTED_ROW_ERRORS';
    payload: {
        errors: string[] | null;
    };
} | {
    type: 'SORT_COLUMN';
    payload: {
        columnIndex: number;
        direction: SortDirection | null;
        tableConfig: ObjectSetTableConfig<T>;
    };
};
declare const tableReducer: <T extends DataType = DataType>(state: TableState<T>, action: TableAction<T>) => TableState<T>;
export { tableReducer };
export type { TableAction, TableState };
//# sourceMappingURL=table-reducer.d.ts.map