import { FieldOption, FilterGroup, Filter, TypesValueAllowed } from '../../../functional-components/filter-group/filter-builder-types';
import { DataColumn, DataRow } from '../../../types/data-structures';
declare const DatesComparation: {
    EQ: {
        label: string;
        function: (date1: Date, date2: Date) => boolean;
    };
    ON: {
        label: string;
        function: (date1: Date, date2: Date) => boolean;
    };
    AFTER: {
        label: string;
        function: (date1: Date, date2: Date) => boolean;
    };
    ONORAFTER: {
        label: string;
        function: (date1: Date, date2: Date) => boolean;
    };
    BEFORE: {
        label: string;
        function: (date1: Date, date2: Date) => boolean;
    };
    ONORBEFORE: {
        label: string;
        function: (date1: Date, date2: Date) => boolean;
    };
};
declare const StringsComparation: {
    CONTAINS: {
        label: string;
        function: (str1: string, str2: string) => boolean;
    };
    STARTS: {
        label: string;
        function: (str1: string, str2: string) => boolean;
    };
    EQ: {
        label: string;
        function: (str1: string, str2: string) => boolean;
    };
    NEQ: {
        label: string;
        function: (str1: string, str2: string) => boolean;
    };
};
declare const NumbersComparation: {
    EQ: {
        label: string;
        function: (num1: number, num2: number) => boolean;
    };
    NEQ: {
        label: string;
        function: (num1: number, num2: number) => boolean;
    };
    GT: {
        label: string;
        function: (num1: number, num2: number) => boolean;
    };
    GTE: {
        label: string;
        function: (num1: number, num2: number) => boolean;
    };
    LT: {
        label: string;
        function: (num1: number, num2: number) => boolean;
    };
    LTE: {
        label: string;
        function: (num1: number, num2: number) => boolean;
    };
};
/**
 * From the definitions of the sorting functions, the labels are extracted to have the correct typings
 */
export type DatesComparationLabel = (typeof DatesComparation)[keyof typeof DatesComparation]["label"];
export type StringsComparationLabel = (typeof StringsComparation)[keyof typeof StringsComparation]["label"];
export type NumberComparationLabel = (typeof NumbersComparation)[keyof typeof NumbersComparation]["label"];
/**
 * Function that evaluates the Dates type label and returns the appropriate comparison function. If the passed label does not exist, a function is returned that always returns null.
 * @param label : String parameter of type DatesComparisonLabel for comparing Dates.
 * @returns comparison function ((Date, Date) => boolean); (() => null) if the label is not among those registered.
 */
export declare const functionByDateLabel: (label: DatesComparationLabel) => ((a: Date, b: Date) => boolean | null);
/**
 * Function that evaluates the String type label and returns the appropriate comparison function. If the passed label does not exist, a function is returned that always returns null.
 * @param label : String parameter of type StringsComparationLabel for comparing generic Strings.
 * @returns comparison function ((string, string) => boolean); (() => null) if the label is not among those registered.
 */
export declare const functionByStringLabel: (label: StringsComparationLabel) => ((a: string, b: string) => boolean | null);
/**
 * Function that evaluates the number type label and returns the appropriate comparison function. If the passed label does not exist, a function is returned that always returns null.
 * @param label : number parameter of type NumberComparationLabel for comparing generic number.
 * @returns comparison function ((number, number) => boolean); (() => null) if the label is not among those registered.
 */
export declare const functionByNumberLabel: (label: NumberComparationLabel) => ((a: number, b: number) => boolean | null);
/**
 * Convert columns into FieldOptions ( options )
 */
export declare function createFieldOptions(columns: DataColumn[], typeMap?: Record<string, TypesValueAllowed>): FieldOption[];
/**
 * Extract all the filters for a specific columns
 */
export declare function extractColumnFilters(filters: FilterGroup, columnName: string): FilterGroup;
/**
 * Update filters for a specific column inside the principal FilterGroup
 */
export declare function updateColumnFilters(mainFilters: FilterGroup, columnName: string, columnFilters: FilterGroup): FilterGroup;
/**
 * Parse filter input into a FilterGroup filter
 */
export declare function parseFilterInput(input: FilterGroup | string | undefined | null, fieldOptions: FieldOption[]): FilterGroup;
/**
 * Function that receives a string like "filterGroup1|filterGroup2|...|filterGroupn" and converts them to a FilterGroup with 'and' logic setted
 * @param input string like "filterGroup1|filterGroup2|...|filterGroupn"
 * @param fieldOptions
 * @returns FilterGroup populated with filterGroups and with 'and' logic setted.
 */
export declare function extractFilterGroupsFromString(input: string, fieldOptions: FieldOption[]): FilterGroup;
/**
 * Apply filters to rows
 */
export declare function applyFiltersToRows(rows: DataRow[], filters: Filter): DataRow[];
export declare const isColumnFiltered: (columnId: string, activeFilters: FilterGroup) => boolean;
export declare const countActiveFilters: (activeFilters: FilterGroup) => number;
export {};
//# sourceMappingURL=data-table-filter-utils.d.ts.map