/**
 * 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 type { Collection } from '@nocobase/flow-engine';
import { type ButtonProps, type PopoverProps } from 'antd';
import React, { FC } from 'react';
import { CompiledFilter } from './useFilterActionProps';
export interface CollectionFilterProps {
    /** Collection whose fields drive the filter row's field picker. */
    collection: Collection | undefined;
    /** Previously compiled filter param used to seed the editable filter group. */
    initialValue?: CompiledFilter;
    /** Called on Submit or Reset with the compiled NocoBase filter param (`undefined` when cleared). */
    onChange: (filter: CompiledFilter) => void;
    /** Translator. Defaults to identity. */
    t?: (key: string, options?: Record<string, any>) => string;
    /** Whitelist of root-level field names to expose. */
    filterableFieldNames?: string[];
    /**
     * Blacklist of root-level field names to drop. Mirrors v1's `nonfilterable: [...]` on `Filter.Action`. When both `filterableFieldNames` and this prop are supplied, both apply (final = whitelist ∩ ¬blacklist).
     */
    nonfilterableFieldNames?: string[];
    /**
     * Bypass the `filterableFieldNames` whitelist.
     *
     * Legacy escape hatch — prefer adjusting `filterableFieldNames` / `nonfilterableFieldNames` instead.
     */
    noIgnore?: boolean;
    /** Override the trigger button's label. Defaults to `t('Filter')`, or the v1-style `t('{{count}} filter items', { count })` when conditions are present. */
    buttonText?: React.ReactNode;
    /** Swap the default `t('Filter')` label for v1's `t('{{count}} filter items', { count })` when conditions are present. Defaults to `true`. */
    showCount?: boolean;
    /** Pass-through props for the antd `<Popover>`. */
    popoverProps?: Omit<PopoverProps, 'open' | 'onOpenChange' | 'content' | 'children'>;
    /** Pass-through props for the trigger `<Button>`. */
    buttonProps?: Omit<ButtonProps, 'icon' | 'type' | 'children' | 'onClick'>;
    /** Min-width applied to the popover body. Defaults to `520`. */
    popoverMinWidth?: number;
}
/**
 * Filter button bound to a collection. Renders an antd `<Popover>` over a `<Button>`; the popover hosts a multi-condition filter form (field picker, operator, value). Submit dismisses the popover and emits the compiled filter via `onChange`; Reset keeps the popover open and emits `undefined`.
 *
 * Pair with `<ExtendCollectionsProvider>` when the target collection is client-only (e.g. a `schema-only` server collection that isn't auto-published to the v2 data source).
 */
export declare const CollectionFilter: FC<CollectionFilterProps>;
export default CollectionFilter;
