/**
 * 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 { Collection } from '@nocobase/flow-engine';
import React, { FC } from 'react';
export interface CollectionFilterItemValue {
    path: string;
    operator: string;
    /** Operator-dependent — string for default ops, descriptor for $date*, etc. */
    value: any;
}
export interface CollectionFilterItemProps {
    /** Reactive filter row managed by the parent `FilterContainer`. */
    value: CollectionFilterItemValue;
    /** Target collection whose fields populate the field selector. */
    collection: Collection;
    /** Whitelist of field names to expose; empty/undefined means all filterable fields. */
    filterableFieldNames?: string[];
    /**
     * Blacklist of field names to drop. Mirrors v1's `nonfilterable: [...]` on `Filter.Action`. When both whitelist and blacklist are supplied, both apply (final = whitelist ∩ ¬blacklist).
     */
    nonfilterableFieldNames?: string[];
    /**
     * Bypass the `filterableFieldNames` whitelist (matches the legacy FilterItem `noIgnore`).
     *
     * Legacy escape hatch — prefer adjusting `filterableFieldNames` / `nonfilterableFieldNames` instead.
     */
    noIgnore?: boolean;
    /** Translator; defaults to identity so callers can omit it. */
    t?: (key: string) => string;
    /** Optional v2 app registry used to resolve plugin-provided operator components. */
    app?: {
        getComponent?: (name: string) => React.ComponentType<any> | undefined;
    };
}
/**
 * Filter row bound directly to a `Collection`, with no `FlowModel` dependency. Use this from settings pages or other surfaces that need a filter UI but don't have (and shouldn't synthesise) a block model just to satisfy `FilterItem`. Pair with `FilterContainer` via either an inline wrapper or `createCollectionFilterItem(collection)`.
 *
 * The field selector is an antd `Cascader`, mirroring v1's `Filter.Action` so association fields (belongsTo / m2o / etc.) can be drilled into — picking `user.username` is a first-class action. The value renderer is delegated to `FilterValueInput`, which dispatches to interface-specific controls (the smart date picker for `$date*` operators, tag-mode Select for array/enum, etc.) the same way v1's `DynamicComponent` did.
 */
export declare const CollectionFilterItem: FC<CollectionFilterItemProps>;
/**
 * Convenience factory returning a `FilterContainer`-compatible `FilterItem` component bound to a specific collection. Avoids creating an inline closure on every parent render, which would otherwise reset any focused inner antd control.
 */
export declare function createCollectionFilterItem(collection: Collection, bound?: Pick<CollectionFilterItemProps, 'filterableFieldNames' | 'nonfilterableFieldNames' | 'noIgnore' | 't' | 'app'>): React.FC<{
    value: CollectionFilterItemValue;
}>;
export default CollectionFilterItem;
