/**
 * 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 { FlowSurfaceActionLinkageRule, FlowSurfaceFieldLinkageRule, FlowSurfaceFieldLinkageScene, FlowSurfaceFieldOption, FlowSurfaceFieldPathToUidResolver, FlowSurfaceFieldUidToPathResolver, FlowSurfaceReactionFilter, FlowSurfaceBlockLinkageRule } from './types';
type NormalizeFieldRuleOptions = {
    scene: FlowSurfaceFieldLinkageScene;
    resolveFieldPath?: FlowSurfaceFieldUidToPathResolver;
};
type CompileFieldRuleOptions = {
    scene: FlowSurfaceFieldLinkageScene;
    resolveFieldUid?: FlowSurfaceFieldPathToUidResolver;
};
type FlowSurfaceLinkageValidationCapability = {
    conditionMeta: {
        operatorsByPath: Record<string, string[]>;
        fieldMetaByPath?: Record<string, {
            type?: string;
            interface?: string;
        }>;
    };
};
type FlowSurfaceFieldLinkageValidationCapability = FlowSurfaceLinkageValidationCapability & {
    targetFields: FlowSurfaceFieldOption[];
    valueExprMeta?: {
        supportedSources: Array<'literal' | 'path' | 'runjs'>;
    };
};
export declare function validateReactionFilterAgainstCapability(filter: FlowSurfaceReactionFilter | undefined, capability: FlowSurfaceLinkageValidationCapability, prefix: string): void;
export declare function buildReactionFingerprint(value: any): string;
export declare function normalizeBlockLinkageRules(rawRules: unknown): FlowSurfaceBlockLinkageRule[];
export declare function normalizeActionLinkageRules(rawRules: unknown): FlowSurfaceActionLinkageRule[];
export declare function normalizeFieldLinkageRules(rawRules: unknown, options: NormalizeFieldRuleOptions): FlowSurfaceFieldLinkageRule[];
export declare function validateBlockLinkageSceneSupport(scene: string, rules?: FlowSurfaceBlockLinkageRule[]): void;
export declare function validateBlockLinkageRulesAgainstCapability(rules: FlowSurfaceBlockLinkageRule[], capability: FlowSurfaceLinkageValidationCapability): void;
export declare function validateActionLinkageSceneSupport(scene: string, rules?: FlowSurfaceActionLinkageRule[]): void;
export declare function validateActionLinkageRulesAgainstCapability(rules: FlowSurfaceActionLinkageRule[], capability: FlowSurfaceLinkageValidationCapability): void;
export declare function validateFieldLinkageSceneSupport(scene: FlowSurfaceFieldLinkageScene, rules?: FlowSurfaceFieldLinkageRule[]): void;
export declare function validateFieldLinkageRulesAgainstCapability(rules: FlowSurfaceFieldLinkageRule[], capability: FlowSurfaceFieldLinkageValidationCapability): void;
export declare function compileBlockLinkageCanonicalRules(rules: FlowSurfaceBlockLinkageRule[]): {
    key: string;
    title: string;
    enable: boolean;
    condition: any;
    actions: ({
        key: string;
        name: "linkageSetBlockProps";
        params: {
            value: "visible" | "hidden";
        };
    } | {
        key: string;
        name: "linkageRunjs";
        params: {
            value: {
                version?: "v1" | "v2";
                script: string;
            };
        };
    })[];
}[];
export declare function compileActionLinkageCanonicalRules(rules: FlowSurfaceActionLinkageRule[]): {
    key: string;
    title: string;
    enable: boolean;
    condition: any;
    actions: ({
        key: string;
        name: "linkageSetActionProps";
        params: {
            value: "visible" | "hidden" | "hiddenText" | "enabled" | "disabled";
        };
    } | {
        key: string;
        name: "linkageRunjs";
        params: {
            value: {
                version?: "v1" | "v2";
                script: string;
            };
        };
    })[];
}[];
export declare function compileFieldLinkageCanonicalRules(rules: FlowSurfaceFieldLinkageRule[], options: CompileFieldRuleOptions): {
    key: string;
    title: string;
    enable: boolean;
    condition: any;
    actions: ({
        key: string;
        name: "linkageSetFieldProps" | "linkageSetDetailsFieldProps" | "subFormLinkageSetFieldProps";
        params: {
            value: {
                fields: string[];
                state: "visible" | "hidden" | "enabled" | "disabled" | "hiddenReservedValue" | "required" | "notRequired";
            };
        };
    } | {
        key: string;
        name: "linkageAssignField" | "subFormLinkageAssignField";
        params: {
            value: {
                key: string;
                enable: boolean;
                targetPath: string;
                mode: "default" | "assign";
                condition: any;
                value: any;
            }[];
        };
    } | {
        key: string;
        name: "setFieldsDefaultValue";
        params: {
            value: {
                key: string;
                enable: boolean;
                targetPath: string;
                mode: "default" | "assign";
                condition: any;
                value: any;
            }[];
        };
    } | {
        key: string;
        name: "linkageRunjs";
        params: {
            value: {
                version?: "v1" | "v2";
                script: string;
                fields?: undefined;
                state?: undefined;
            };
        };
    })[];
}[];
export {};
