/**
 * 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 FlowRuntimeContext } from '@nocobase/flow-engine';
import type { SelectProps } from 'antd';
import React from 'react';
export interface AssociationFieldNames {
    label: string;
    value: string;
}
export declare function normalizeAssociationFieldNames(fieldNames: Partial<AssociationFieldNames> | undefined, targetCollection?: any): AssociationFieldNames;
export type AssociationOption = Record<string, any>;
export type PopupScrollEvent = Parameters<NonNullable<SelectProps<any>['onPopupScroll']>>[0];
export declare function buildOpenerUids(ctx: FlowRuntimeContext, inputArgs?: Record<string, unknown>): string[];
export interface LazySelectProps extends Omit<SelectProps<any>, 'mode' | 'options' | 'value' | 'onChange'> {
    fieldNames: AssociationFieldNames;
    value?: AssociationOption | AssociationOption[] | string | string[] | number | number[];
    multiple?: boolean;
    allowMultiple?: boolean;
    keepDropdownOpenOnSelect?: boolean;
    options?: AssociationOption[];
    valueMode?: 'record' | 'value';
    onChange: (option: AssociationOption | AssociationOption[] | string | string[] | number | number[]) => void;
    onDropdownVisibleChange?: (open: boolean) => void;
    onPopupScroll?: SelectProps<any>['onPopupScroll'];
    onSearch?: SelectProps<any>['onSearch'];
    loading?: boolean;
    onCompositionStart?: (e: any) => void;
    onCompositionEnd?: (e: any, flag?: boolean) => void;
    quickCreate?: 'none' | 'modalAdd' | 'quickAdd';
    onModalAddClick?: (e: any) => void;
    onDropdownAddClick?: (e: any) => void;
    searchText?: string;
    allowCreate?: boolean;
    allowEdit?: boolean;
}
export interface LabelByFieldProps {
    option: AssociationOption;
    fieldNames: AssociationFieldNames;
}
export declare function LabelByField(props: Readonly<LabelByFieldProps>): React.JSX.Element;
export declare function toSelectValue(record: AssociationOption | AssociationOption[] | string | string[] | number | number[] | undefined, fieldNames: AssociationFieldNames, multiple?: boolean, valueMode?: 'record' | 'value', options?: AssociationOption[]): any;
export declare function resolveOptions(options: AssociationOption[] | undefined, value: AssociationOption | AssociationOption[] | string | string[] | number | number[] | undefined, isMultiple: boolean): AssociationOption[];
