/**
 * 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 { FormInstance } from 'antd';
import type { FlowModel } from '@nocobase/flow-engine';
import type { FormAssignRuleItem, NamePath, Patch, SetOptions } from './types';
type FormBlockModel = FlowModel & {
    getAclActionName?: () => string;
};
export declare class FormValueRuntime {
    private readonly model;
    private readonly getForm;
    private readonly valuesMirror;
    private readonly explicitSet;
    private readonly userEditedSet;
    private readonly lastDefaultValueByPathKey;
    private readonly lastWriteMetaByPathKey;
    private readonly observableBindings;
    private readonly changeTick;
    private readonly txWriteCounts;
    private writeSeq;
    private disposed;
    private suppressFormCallbackDepth;
    private lastObservedChangedPaths;
    private lastObservedSource;
    private lastObservedToken;
    private readonly formValuesProxy;
    private readonly mountedFieldModelsByPathKey;
    private readonly mountedFieldModelPathKeys;
    private mountedListener?;
    private unmountedListener?;
    private readonly formPatcher;
    private readonly ruleEngine;
    constructor(options: {
        model: FormBlockModel;
        getForm: () => FormInstance;
    });
    /**
     * 同步“表单赋值”配置到运行时规则引擎。
     *
     * - mode=default → source=default（遵循 explicit/空值覆盖语义）
     * - mode=assign  → source=system（不受 explicit 影响，依赖变化时持续生效）
     * - mode=override → source=override（首次覆盖已有值，用户修改后停止）
     */
    syncAssignRules(items: FormAssignRuleItem[]): void;
    get formValues(): any;
    getFormValuesSnapshot(): any;
    private toMirrorSnapshot;
    canApplyDefaultValuePatch(namePath: NamePath, resolved: any): boolean;
    canApplyOverrideValuePatch(namePath: NamePath): boolean;
    recordDefaultValuePatch(namePath: NamePath, value?: any): void;
    private getFormValueAtPath;
    mount(options?: {
        sync?: boolean;
    }): void;
    dispose(): void;
    resetAfterFormReset(): void;
    resetUserEditedState(): void;
    isSuppressed(): boolean;
    handleFormFieldsChange(changedFields: Array<{
        name?: NamePath | string | number;
        touched?: boolean;
    }>): void;
    private shouldIgnoreSyntheticTouchedInit;
    private isDeletedArrayItemPath;
    private pruneDeletedArrayItemState;
    private getArrayItemTargetKey;
    private getArrayItemIdentity;
    private reconcileArrayItemState;
    private getReconciledArrayItemPath;
    private reconcileArrayItemSet;
    private reconcileArrayItemMap;
    private reconcileObservableBindings;
    private getObservedChangedValue;
    private getObservedSnapshot;
    handleFormValuesChange(changedValues: any, allValues: any): void;
    private deriveExplicitPaths;
    private collectExplicitDiffPaths;
    private pushExplicitPath;
    private isPlainObjectValue;
    private isObjectCleared;
    setFormValues(callerCtx: any, patch: Patch, options?: SetOptions): Promise<void>;
    private applyBoundValue;
    private resolveNamePath;
    private tryResolveNamePath;
    private bumpChangeTick;
    private emitFormValuesChange;
    private syncMountedFieldModelValue;
    private syncMountedFieldModelValueForModel;
    private rebuildMountedFieldModelIndex;
    private indexMountedFieldModelTree;
    private unindexMountedFieldModelTree;
    private visitModelAndForks;
    private indexMountedFieldModel;
    private unindexMountedFieldModel;
    private isMountedModelInThisForm;
    private getMountedModelNamePaths;
    private normalizeNamePathValue;
    private markExplicit;
    private markUserEdited;
    private normalizeObservedNamePath;
    private clearExplicitForDefaultPatch;
    private shouldPreserveDescendantDefaultsOnExplicit;
    private shouldKeepDefaultPathEnabled;
    private shouldKeepDefaultPathValueEnabled;
    private isExplicit;
    private findExplicitHit;
    private findUserEditedHit;
    private isDescendantPathKey;
}
export {};
