/**
 * 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 React from 'react';
import { dayjs } from '@nocobase/utils/client';
import { type CollectionField, type MetaTreeNode } from '@nocobase/flow-engine';
import { type ExactDatePickerMode } from './FieldAssignExactDatePicker';
export type DateVariableExactNormalizeMode = 'none' | 'date' | 'datetimeNoTz' | 'iso';
export declare function toExactPickerDisplayValue(rawValue: unknown, options: {
    format: string;
    isRange: boolean;
}): dayjs.Dayjs | [dayjs.Dayjs, dayjs.Dayjs] | null;
export declare function normalizeDateVariableExactValue(rawValue: any, options: {
    exactNormalizeMode: DateVariableExactNormalizeMode;
    format: string;
    showTime: boolean;
}): any;
type DateVariableComponentProps = {
    picker: ExactDatePickerMode;
    showTime: boolean;
    timeFormat: string;
    format: string;
    exactNormalizeMode: DateVariableExactNormalizeMode;
};
export declare function normalizeDateVariableOutput(rawValue: any, options: DateVariableComponentProps): any;
interface Props {
    /** 赋值目标路径，例如 `title` / `users.nickname` / `user.name` */
    targetPath: string;
    value: any;
    onChange: (value: any) => void;
    placeholder?: string;
    /** 额外变量树（置于 Constant/Null/RunJS 与 base metaTree 之间） */
    extraMetaTree?: MetaTreeNode[];
    /** 可选：当前字段的筛选操作符，用于在默认值/赋值编辑器中按 operator schema 适配输入组件 */
    operator?: string;
    /** 可选：操作符元数据列表（通常来自 collectionField.filterable.operators） */
    operatorMetaList?: Array<any>;
    /** 可选：当字段已存在于表单时，优先复用表单字段的模型（用于筛选表单默认值等场景） */
    preferFormItemFieldModel?: boolean;
    /** 可选：关系字段显示映射覆盖（用于值编辑器内预览 title field） */
    associationFieldNamesOverride?: {
        label?: string;
        value?: string;
    };
    /**
     * 在日期字段场景下，用日期变量编辑器替换 Constant 位。
     * 默认 false，保持历史行为。
     */
    enableDateVariableAsConstant?: boolean;
}
export declare function mergeItemMetaTreeForAssignValue(baseTree: MetaTreeNode[], extraTree: MetaTreeNode[]): MetaTreeNode[];
export declare function resolveAssignValueFieldPath(itemModel: any): string | undefined;
type AssignValueFieldSettingsInit = {
    dataSourceKey?: string;
    collectionName?: string;
    fieldPath?: string;
};
type AssignValueFieldSource = {
    originFieldModel?: any;
    originProps: Record<string, any>;
    customFieldName?: string;
    customFieldProps: Record<string, any>;
    currentAllowMultiple?: boolean;
    currentFieldModelUse?: string;
};
export declare function resolveAssignValueFieldModelConfig(options: {
    itemModel: any;
    defaultBindingUse?: string;
    collectionField?: Pick<CollectionField, 'isAssociationField'> | null;
    fieldSource?: AssignValueFieldSource;
    preferFormItemFieldModel?: boolean;
    fieldSettingsInit?: AssignValueFieldSettingsInit;
}): {
    use?: string;
    stepParams: Record<string, any>;
};
/**
 * 根据所选字段渲染对应的赋值编辑器：
 * - 使用临时的 VariableFieldFormModel 包裹字段模型，确保常量编辑为真实字段组件
 * - 支持变量引用，并提供 Constant / Null 两种快捷项
 */
export declare const FieldAssignValueInput: React.FC<Props>;
export {};
