/**
 * This file is part of the NocoBase (R) project.
 * Copyright (c) 2020-2024 NocoBase Co., Ltd.
 * Authors: NocoBase Team.
 *
 * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
 * For more information, please refer to: https://www.nocobase.com/agreement.
 */
import { Schema } from '@formily/react';
import { FilterTarget } from '../block-provider/hooks';
import { CollectionFieldOptions_deprecated, FieldOptions } from '../collection-manager';
import { Collection } from '../data-source/collection/Collection';
import { DataBlock } from './FilterProvider';
export declare enum FilterBlockType {
    FORM = 0,
    TABLE = 1,
    TREE = 2,
    COLLAPSE = 3
}
export declare const mergeFilter: (filters: any[], op?: string) => any;
export declare const getSupportFieldsByAssociation: (inheritCollectionsChain: string[], block: DataBlock) => CollectionFieldOptions_deprecated[];
export declare const getSupportFieldsByForeignKey: (filterBlockCollection: Collection, block: DataBlock) => import("./FilterProvider").ForeignKeyField[];
/**
 * 根据筛选区块类型筛选出支持的数据区块（同表或具有关系字段的表）
 * @param filterBlockType
 * @returns
 */
export declare const useSupportedBlocks: (filterBlockType: FilterBlockType) => DataBlock[];
export declare const transformToFilter: (values: Record<string, any>, operators: Record<string, string>, getCollectionJoinField: (name: string) => CollectionFieldOptions_deprecated, collectionName: string) => {
    $and: {
        [x: string]: {
            [x: string]: any;
        };
    }[];
};
export declare const useAssociatedFields: () => import("../data-source/collection/Collection").CollectionFieldOptions[];
export declare const isAssocField: (field?: FieldOptions) => boolean;
export declare const isSameCollection: (c1: Collection, c2: Collection) => boolean;
export declare const useFilterAPI: () => {
    /** 当前区块是否已连接其它区块 */
    isConnected: boolean;
    /** 调用该方法进行过滤 */
    doFilter: (value: any, field?: string | ((target: FilterTarget['targets'][0], block: DataBlock) => string), operator?: string | ((target: FilterTarget['targets'][0]) => string)) => void;
};
export declare const isInFilterFormBlock: (fieldSchema: Schema) => boolean;
