/**
 * 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 FlowModelContext } from '@nocobase/flow-engine';
import React from 'react';
import { AssignFormModel } from './AssignFormModel';
export declare const ASSIGN_FIELD_VALUES_STEP_KEY = "assignFieldValues";
type AssignedValues = Record<string, unknown>;
type AssignFieldValuesCollection = {
    dataSourceKey?: string;
    name?: string;
};
type AssignFieldValuesContext = FlowModelContext & {
    collection?: AssignFieldValuesCollection;
    flowSettingsEnabled?: boolean;
};
type AssignFieldValuesModel = {
    uid: string;
    assignFormUid?: string;
    context?: AssignFieldValuesContext;
    subModels?: {
        assignForm?: AssignFormModel;
    };
    getStepParams?: (flowKey: string, stepKey: string) => {
        assignedValues?: AssignedValues;
    } | undefined;
    setStepParams?: (flowKey: string, stepKey: string, params: {
        assignedValues: AssignedValues;
    }) => void;
};
type AssignFieldValuesStepOptions = {
    settingsFlowKey: string;
    title?: string;
    tipComponent?: React.ComponentType;
    validateBeforeSave?: boolean;
    clearRecordContext?: boolean;
};
export declare function createAssignFormSubModelOptions(ctx: AssignFieldValuesContext): {
    async: boolean;
    use: string;
    stepParams: {
        resourceSettings: {
            init: {
                dataSourceKey: string;
                collectionName: string;
            };
        };
    };
};
export declare function getAssignFieldValuesDefaultParams(ctx: {
    model: Pick<AssignFieldValuesModel, 'getStepParams'>;
}, settingsFlowKey: string): {
    assignedValues: AssignedValues;
};
export declare function resolveAssignFieldValues(ctx: {
    message?: {
        error?: (message: string) => void;
    };
    t?: (message: string) => string;
}, rawAssignedValues: unknown, logName?: string): Promise<AssignedValues | null>;
export declare function mergeAssignFieldValues<T extends Record<string, unknown>>(values: T, assignedValues?: AssignedValues | null): T;
export declare function createAssignFieldValuesStep(options: AssignFieldValuesStepOptions): {
    title: string;
    uiSchema(): {
        tip: {
            'x-decorator': string;
            'x-component': React.ComponentType<{}>;
        };
        editor: {
            'x-decorator': string;
            'x-component': () => React.JSX.Element;
        };
    };
    beforeParamsSave(ctx: {
        model: AssignFieldValuesModel;
        engine: {
            getModel?: (uid: string, fromRoot?: boolean) => AssignFormModel | undefined;
            findModelByParentId?: (parentId: string, subKey: string) => AssignFormModel | undefined | null;
        };
    }, params?: {
        assignedValues?: AssignedValues;
    }, previousParams?: {
        assignedValues?: AssignedValues;
    }): Promise<void>;
    handler(): void;
};
export {};
