/**
 * 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 { GeneralField } from '@formily/core';
import { Schema } from '@formily/react';
import { FC } from 'react';
import { Collection } from '../../../data-source/collection/Collection';
import { AssociationFieldMode } from './AssociationFieldModeProvider';
export declare const useInsertSchema: (component: any) => (ss: any) => void;
export declare function useAssociationFieldContext<F extends GeneralField>(): {
    options: any;
    field: F;
    fieldSchema?: Schema;
    currentMode: AssociationFieldMode;
    allowMultiple?: boolean;
    allowDissociate?: boolean;
};
export default function useServiceOptions(props: any): any;
export declare const useFieldNames: (props?: {
    fieldNames?: {
        label: string;
        value: string;
    };
}) => any;
interface SubFormProviderProps {
    value: any;
    collection: Collection;
    /**
     * the schema of the current sub-table or sub-form
     */
    fieldSchema?: Schema;
    parent?: SubFormProviderProps;
    /**
     * Ignore the current value in the upper and lower levels
     */
    skip?: boolean;
}
export declare const SubFormProvider: FC<{
    value: SubFormProviderProps;
}>;
/**
 * 用于获取子表单所对应的 form 对象，其应该保持响应性，即一个 Proxy 对象；
 *
 * ## 为什么要有这个方法？
 * 1. 目前使用 useForm 方法获取到的是普通表单区块的 form 对象，无法通过简单的方法获取到子表单对应的 form 对象；
 * 2. 虽然现在 useRecord  也可以获取到相同值的对象，但是这个对象不是响应式的（因其内部 copy 过一次），字段值变更时无法监听到；
 * 3. 可能更好的方式是在 useForm 返回的 form 对象添加一个 parent 属性，但可能会影响其它部分的代码，所以暂时不做修改；
 * @returns
 */
export declare const useSubFormValue: () => {
    formValue: any;
    collection: Collection;
    fieldSchema: Schema<any, any, any, any, any, any, any, any, any>;
    parent: SubFormProviderProps;
};
export {};
