/**
 * 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 { ISchema, Schema } from '@formily/react';
import { CascaderProps, MenuItemProps, ModalFuncProps } from 'antd';
import React, { FC, ReactNode } from 'react';
import { SchemaSettingsItemType } from '../';
import { CollectionFieldOptions_deprecated } from '../collection-manager/types';
import { SelectWithTitleProps } from '../common/SelectWithTitle';
import { Designable } from '../schema-component/hooks/useDesignable';
export interface SchemaSettingsProps {
    title?: any;
    dn?: Designable;
    field?: GeneralField;
    fieldSchema?: Schema;
    children?: ReactNode;
    mode?: 'inline' | 'dropdown';
}
interface SchemaSettingsContextProps<T = any> {
    dn?: Designable;
    field?: GeneralField;
    fieldSchema?: Schema;
    setVisible?: any;
    visible?: any;
    template?: any;
    collectionName?: any;
    designer?: T;
}
export declare function useSchemaSettings<T = any>(): SchemaSettingsContextProps<T>;
interface SchemaSettingsProviderProps {
    dn?: Designable;
    field?: GeneralField;
    fieldSchema?: Schema;
    setVisible?: any;
    visible?: any;
    template?: any;
    collectionName?: any;
    designer?: any;
}
export declare const SchemaSettingsProvider: React.FC<SchemaSettingsProviderProps>;
export declare const SchemaSettingsDropdown: React.FC<SchemaSettingsProps>;
export declare const SchemaSettingsFormItemTemplate: (props: any) => React.JSX.Element;
export interface SchemaSettingsItemProps extends Omit<MenuItemProps, 'title'> {
    title: string | ReactNode;
}
export declare const SchemaSettingsItem: FC<SchemaSettingsItemProps>;
export interface SchemaSettingsItemGroupProps {
    title: string;
    children: any[];
}
export declare const SchemaSettingsItemGroup: FC<SchemaSettingsItemGroupProps>;
export interface SchemaSettingsSubMenuProps {
    title: string;
    eventKey?: string;
    children: any;
}
export declare const SchemaSettingsSubMenu: (props: SchemaSettingsSubMenuProps) => React.JSX.Element;
export declare const SchemaSettingsDivider: () => any;
export interface SchemaSettingsRemoveProps {
    disabled?: boolean;
    title?: string;
    confirm?: ModalFuncProps;
    removeParentsIfNoChildren?: boolean;
    breakRemoveOn?: ISchema | ((s: ISchema) => boolean);
}
export declare const getSchemaSettingsDialogZIndex: (parentZIndex: number) => number;
export declare const getSchemaSettingsConfirmZIndex: (parentZIndex: number) => number;
export declare const SchemaSettingsRemove: FC<SchemaSettingsRemoveProps>;
export interface SchemaSettingsSelectItemProps extends Omit<SchemaSettingsItemProps, 'onChange' | 'onClick'>, Omit<SelectWithTitleProps, 'title' | 'defaultValue'> {
    value?: SelectWithTitleProps['defaultValue'];
    optionRender?: (option: any, info: {
        index: number;
    }) => React.ReactNode;
}
export declare const SchemaSettingsSelectItem: FC<SchemaSettingsSelectItemProps>;
export type SchemaSettingsCascaderItemProps = CascaderProps<any> & Omit<MenuItemProps, 'title'> & {
    title: any;
};
export declare const SchemaSettingsCascaderItem: FC<SchemaSettingsCascaderItemProps>;
export interface SchemaSettingsSwitchItemProps extends Omit<MenuItemProps, 'onChange'> {
    title: string | ReactNode;
    checked?: boolean;
    onChange?: (v: boolean) => void;
}
export declare const SchemaSettingsSwitchItem: FC<SchemaSettingsSwitchItemProps>;
export interface SchemaSettingsPopupProps extends SchemaSettingsItemProps {
    schema?: ISchema;
}
export declare const SchemaSettingsPopupItem: FC<SchemaSettingsPopupProps>;
export interface SchemaSettingsActionModalItemProps extends SchemaSettingsModalItemProps {
    uid?: string;
    initialSchema?: ISchema;
    schema?: ISchema;
    beforeOpen?: () => void;
    maskClosable?: boolean;
    width?: string | number;
}
export declare const SchemaSettingsActionModalItem: FC<SchemaSettingsActionModalItemProps>;
export interface SchemaSettingsModalItemProps {
    title: string;
    onSubmit: (values: any) => Promise<any> | void;
    initialValues?: any;
    schema?: ISchema | (() => ISchema);
    modalTip?: string;
    components?: any;
    hidden?: boolean;
    scope?: any;
    effects?: any;
    width?: string | number;
    children?: ReactNode;
    asyncGetInitialValues?: () => Promise<any>;
    eventKey?: string;
    hide?: boolean;
    /** 上下文中不需要当前记录 */
    noRecord?: boolean;
    /** 自定义 Modal 上下文 */
    ModalContextProvider?: React.FC;
    dialogRootClassName?: string;
}
export declare const SchemaSettingsModalItem: FC<SchemaSettingsModalItemProps>;
export declare const SchemaSettingsDefaultSortingRules: (props: any) => React.JSX.Element;
export declare const SchemaSettingsLinkageRules: (props: any) => React.JSX.Element;
export declare const useDataTemplates: (schema?: Schema) => {
    templateData: any;
};
export declare const SchemaSettingsDataTemplates: (props: any) => React.JSX.Element;
export declare function SchemaSettingsEnableChildCollections(props: any): React.JSX.Element;
export declare const defaultInputStyle: string;
export declare const findParentFieldSchema: (fieldSchema: Schema) => Schema<any, any, any, any, any, any, any, any, any>;
export declare const schemaSettingsLabelLayout: SchemaSettingsItemType;
export declare const isSystemField: (collectionField: CollectionFieldOptions_deprecated, getInterface: any) => boolean;
export declare function getFieldDefaultValue(fieldSchema: ISchema, collectionField: CollectionFieldOptions_deprecated): any;
export {};
