/**
 * 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 { FlowContext } from '@nocobase/flow-engine';
import { type FieldIndexEntry, type NamePath } from './formValueDeps';
export type FilterTargetKey = string | string[] | null | undefined;
export type RowIdentity = string;
export type RowScopedFieldIndexEntry = FieldIndexEntry & {
    filterTargetKey?: FilterTargetKey;
};
export type RowScope = {
    entries: RowScopedFieldIndexEntry[];
    tailPath: NamePath;
    identityTailPaths: NamePath[];
};
export type DataScopeValuePath = {
    path: NamePath;
    rowScope?: RowScope;
};
export type DataScopeStructuralPath = {
    path: NamePath;
    kind: 'index' | 'length';
    rowScope?: RowScope;
};
export type DataScopeTriggerPath = {
    path: NamePath;
    includeChildren: boolean;
};
export type DataScopeClearDeps = {
    wildcard: boolean;
    valuePaths: DataScopeValuePath[];
    structuralPaths: DataScopeStructuralPath[];
    triggerPaths: DataScopeTriggerPath[];
};
export type DataScopeSnapshotValue = {
    value: unknown;
    rowIdentities?: Array<RowIdentity | null>;
    rowDetached?: boolean;
};
export type DataScopeClearSnapshot = {
    complete: boolean;
    rowDetached: boolean;
    rowMissing: boolean;
    values: Map<string, DataScopeSnapshotValue>;
    structures: Map<string, DataScopeSnapshotValue>;
};
export type DataScopeClearChangeStatus = {
    status: 'changed' | 'unchanged' | 'unknown';
    snapshot: DataScopeClearSnapshot | null;
};
export declare function applyDataScopeFieldIndexTargetKeys(ctx: FlowContext, entries: FieldIndexEntry[]): RowScopedFieldIndexEntry[];
export declare function createDataScopeRowScope(entries: RowScopedFieldIndexEntry[], parentDepth: number, tailPath: NamePath): RowScope | undefined;
export declare function buildDepsSnapshot(deps: DataScopeClearDeps, formBlock: any, payload?: unknown): DataScopeClearSnapshot | null;
export declare function getDepsChangeStatus(deps: DataScopeClearDeps, formBlock: any, payload: unknown, snapshot: DataScopeClearSnapshot | null): DataScopeClearChangeStatus;
