import { SortType } from '..';
import type { BaseTableAPI } from '../base-table';
export declare const registeredAggregators: {
    [key: string]: {
        new (args: {
            key?: string;
            field: string | string[];
            aggregationFun?: any;
            formatFun?: any;
            isRecord?: boolean;
            needSplitPositiveAndNegative?: boolean;
            calculateFun?: any;
            dependAggregators?: any;
            dependIndicatorKeys?: string[];
        }): Aggregator;
    };
};
export interface IAggregator {
    records: any[];
    value: () => any;
    push: (record: any) => void;
    deleteRecord: (record: any) => void;
    updateRecord: (oldRecord: any, newRecord: any) => void;
    recalculate: () => any;
    formatValue?: (col?: number, row?: number, table?: BaseTableAPI) => any;
    formatFun?: () => any;
    clearCacheValue: () => any;
    reset: () => void;
}
export declare abstract class Aggregator implements IAggregator {
    isAggregator?: boolean;
    isRecord?: boolean;
    records: any[];
    type?: string;
    key: string;
    field?: string | string[];
    formatFun?: any;
    changedValue?: any;
    children?: Aggregator[];
    _formatedValue?: any;
    constructor(config: {
        key: string;
        field: string | string[];
        formatFun?: any;
        isRecord?: boolean;
    });
    abstract push(record: any): void;
    abstract deleteRecord(record: any): void;
    abstract updateRecord(oldRecord: any, newRecord: any): void;
    abstract value(): any;
    abstract recalculate(): any;
    clearCacheValue(): void;
    formatValue(col?: number, row?: number, table?: BaseTableAPI): any;
    reset(): void;
}
export declare class RecordAggregator extends Aggregator {
    type: string;
    isRecord?: boolean;
    push(record: any): void;
    deleteRecord(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    value(): any;
    reset(): void;
    recalculate(): void;
}
export declare class NoneAggregator extends Aggregator {
    type: string;
    isRecord?: boolean;
    field?: string;
    fieldValue?: any;
    push(record: any): void;
    deleteRecord(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    value(): any;
    reset(): void;
    recalculate(): void;
}
export declare class CustomAggregator extends Aggregator {
    type: string;
    isRecord?: boolean;
    field?: string;
    aggregationFun?: Function;
    values: (string | number)[];
    fieldValue?: any;
    constructor(config: {
        key: string;
        field: string;
        formatFun?: any;
        isRecord?: boolean;
        aggregationFun?: Function;
    });
    push(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    deleteRecord(record: any): void;
    value(): any;
    reset(): void;
    recalculate(): void;
}
export declare class RecalculateAggregator extends Aggregator {
    type: string;
    isRecord?: boolean;
    field?: string;
    calculateFun: Function;
    fieldValue?: any;
    dependAggregators: Aggregator[];
    dependIndicatorKeys: string[];
    constructor(config: {
        key: string;
        field: string;
        formatFun: any;
        isRecord: boolean;
        calculateFun: Function;
        dependAggregators: Aggregator[];
        dependIndicatorKeys: string[];
    });
    push(record: any): void;
    deleteRecord(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    value(): any;
    reset(): void;
    recalculate(): void;
}
export declare class SumAggregator extends Aggregator {
    type: string;
    sum: number;
    positiveSum: number;
    nagetiveSum: number;
    field?: string;
    needSplitPositiveAndNegativeForSum?: boolean;
    constructor(config: {
        key: string;
        field: string;
        formatFun?: any;
        isRecord?: boolean;
        needSplitPositiveAndNegative?: boolean;
    });
    push(record: any): void;
    deleteRecord(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    value(): any;
    positiveValue(): number;
    negativeValue(): number;
    reset(): void;
    recalculate(): void;
}
export declare class CountAggregator extends Aggregator {
    type: string;
    count: number;
    field?: string;
    push(record: any): void;
    deleteRecord(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    value(): any;
    reset(): void;
    recalculate(): void;
}
export declare class AvgAggregator extends Aggregator {
    type: string;
    sum: number;
    count: number;
    field?: string;
    push(record: any): void;
    deleteRecord(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    value(): any;
    reset(): void;
    recalculate(): void;
}
export declare class MaxAggregator extends Aggregator {
    type: string;
    max: number;
    field?: string;
    push(record: any): void;
    deleteRecord(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    value(): any;
    reset(): void;
    recalculate(): void;
}
export declare class MinAggregator extends Aggregator {
    type: string;
    min: number;
    field?: string;
    push(record: any): void;
    deleteRecord(record: any): void;
    updateRecord(oldRecord: any, newRecord: any): void;
    value(): any;
    reset(): void;
    recalculate(): void;
}
export declare function indicatorSort(a: any, b: any): any;
export declare function typeSort(a: any, b: any, sortType: SortType): number;
export declare function naturalSort(as: any, bs: any, sortType: SortType): number;
export declare function sortBy(order: string[]): (a: any, b: any, sortType: SortType) => number;
