/**
 * 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 { ComponentType, ReactNode } from 'react';
export type FieldConfigureComponentType = 'Input' | 'Input.TextArea' | 'InputNumber' | 'Checkbox' | 'Checkbox.Group' | 'ColorPicker' | 'DatePicker' | 'Radio.Group' | 'Select' | 'CollectionSelect' | 'RemoteSelect' | 'TargetKey' | 'SourceKey' | 'ExpiresRadio' | 'ArrayTable' | 'FieldValidation' | 'ForeignKey' | 'Input.JSON' | 'Markdown' | 'Percent' | 'RichText' | 'SourceCollection' | 'Space' | 'ThroughCollection' | 'TimePicker' | 'UnixTimestamp' | (string & {});
export declare const CollectionSelect = "CollectionSelect";
export interface FieldConfigureRuntimeContext {
    createOnly?: boolean;
    editMainOnly?: boolean;
    createMainOnly?: boolean;
    disabledJSONB?: boolean;
    primaryKeyOnly?: boolean;
    showReverseFieldConfig?: boolean;
    [key: string]: unknown;
}
export interface FieldConfigureRuntimeState {
    componentProps?: Record<string, unknown>;
    dataSource?: unknown;
    disabled?: boolean;
    hidden?: boolean;
    hasValue?: boolean;
    value?: unknown;
}
export interface FieldConfigureEffectContext {
    changedName?: string;
    context: FieldConfigureRuntimeContext;
    getValue: (name: string) => unknown;
    setValue: (name: string, value: unknown) => void;
    values: Record<string, unknown>;
}
export interface FieldConfigureItem {
    name: string;
    title?: ReactNode;
    component?: FieldConfigureComponentType;
    Component?: ComponentType<any>;
    componentProps?: Record<string, unknown>;
    defaultValue?: unknown;
    description?: ReactNode;
    hidden?: boolean | string | ((context: FieldConfigureEffectContext) => boolean);
    disabled?: boolean | string | ((context: FieldConfigureEffectContext) => boolean);
    options?: Array<{
        label: ReactNode;
        value: string | number | boolean;
    }>;
    required?: boolean;
    dependencies?: string[];
    effect?: (context: FieldConfigureEffectContext) => void;
    schema?: Record<string, unknown>;
    layout?: {
        row?: string;
        column?: string;
        columnIndex?: number;
        span?: number;
    };
}
export declare function evaluateFieldConfigureExpression(value: unknown, context: FieldConfigureEffectContext): boolean;
export declare function configurePropertiesToItems(properties?: Record<string, any>, options?: {
    components?: Record<string, ComponentType<any>>;
}): FieldConfigureItem[];
export declare function getCoreFieldConfigureState(name: string, values: Record<string, unknown>, context?: FieldConfigureRuntimeContext): FieldConfigureRuntimeState;
export declare function runCoreFieldConfigureEffects(options: FieldConfigureEffectContext): void;
export declare function indexConfigureItems(options?: {
    autoIncrement?: boolean;
}): FieldConfigureItem[];
export declare function dateTimeFormatConfigureItems(options?: {
    includePicker?: boolean;
    hidden?: FieldConfigureItem['hidden'];
    showTimeDefault?: boolean;
}): FieldConfigureItem[];
export declare function reverseFieldConfigureItems(): FieldConfigureItem[];
export declare const reverseFieldConfigureItem: typeof reverseFieldConfigureItems;
export declare function OptionsEditor(options?: {
    name?: string;
    title?: ReactNode;
}): FieldConfigureItem;
