/**
 * 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 { ISchema } from '@formily/react';
import { UseRequestResult } from '../../../api-client/hooks/useRequest';
export interface PopupContext {
    dataSource?: string;
    collection?: string;
    association?: string;
    /**
     * if true, the context will never be updated
     */
    doNotUpdateContext?: boolean;
    readonly blockService?: UseRequestResult<any>;
}
export declare const CONTEXT_SCHEMA_KEY = "x-action-context";
/**
 * support only in Action or AssociationField, because it depends on a specific schema structure
 * @returns
 */
export declare const usePopupContextInActionOrAssociationField: () => {
    /**
     * update the value of the x-nb-popup-context field in the popup schema
     */
    updatePopupContext: (newContext: PopupContext, customSchema?: ISchema) => Promise<any>;
};
/**
 * @param fieldSchema support only schema of Action or AssociationField, because it depends on a specific schema structure
 * @returns
 */
export declare function getPopupContextFromActionOrAssociationFieldSchema(fieldSchema: ISchema): PopupContext;
