import { SortDirection } from '../../../../../../types/src/table';
import { default as Column } from '../../core/column/Column';
import { default as Module } from '../../core/Module';
import { default as Row } from '../../core/row/Row';
import { default as Tabulator } from '../../core/Tabulator';

type SortItem = {
    column: Column;
    dir: SortDirection;
    field?: string;
    params?: any;
};
type SorterFunction = (a: any, b: any, aRow: any, bRow: any, column: any, dir: SortDirection, params: any) => number | boolean;
export default class Sort extends Module {
    static moduleName: string;
    static sorters: Record<string, SorterFunction>;
    sortList: SortItem[];
    changed: boolean;
    constructor(table: Tabulator);
    initialize(): void;
    tableBuilt(): void;
    remoteSortParams(_data: any, _config: any, _silent: any, params: any): any;
    userSetSort(sortList: any, dir?: SortDirection): void;
    clearSort(): void;
    initializeColumn(column: Column): void;
    refreshSort(): void;
    hasChanged(): boolean;
    getSort(): SortItem[];
    setSort(sortList: any, dir?: SortDirection): void;
    clear(): void;
    findSorter(column: Column): SorterFunction | undefined;
    sort(data: Row[], sortOnly?: boolean): Row[];
    clearColumnHeaders(): void;
    setColumnHeader(column: Column, dir: SortDirection): void;
    setColumnHeaderSortIcon(column: Column, dir: SortDirection): void;
    _sortItems(data: Row[], sortList: SortItem[]): void;
    _sortRow(a: Row, b: Row, column: Column, dir: SortDirection, params: any): number;
}
export {};
