/**
 * 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/json-schema';
import { FC, default as React } from 'react';
import { Location } from 'react-router-dom';
import { PopupParams } from './pagePopupUtils';
import { PopupContext } from './usePopupContextInActionOrAssociationField';
interface PopupsVisibleProviderProps {
    visible: boolean;
    setVisible?: (value: boolean) => void;
}
export interface PopupProps {
    params: PopupParams;
    context: PopupContext;
    /**
     * When set to true, the current popup will be hidden.
     */
    hidden: boolean;
    /**
     * Used to identify the level of the current popup, where 1 represents the first level.
     */
    currentLevel: number;
    /**
     * Whether the current popup is a subpage.
     */
    isSubPage?: boolean;
}
export declare const PopupVisibleProviderContext: React.Context<PopupsVisibleProviderProps>;
export declare const PopupParamsProviderContext: React.Context<Omit<PopupProps, "hidden">>;
export declare const AllPopupsPropsProviderContext: React.Context<PopupProps[]>;
/**
 * The difference between this component and ActionContextProvider is that
 * this component is only used to control the popups in the PagePopupsItem component (excluding the nested popups within it).
 * @param param0
 * @returns
 */
export declare const PopupVisibleProvider: FC<PopupsVisibleProviderProps>;
/**
 * insert childSchema to parentSchema to render the nested popups
 * @param childSchema
 * @param props
 * @param parentSchema
 */
export declare const insertChildToParentSchema: ({ childSchema, props, parentSchema, getPopupSchema, }: {
    childSchema: ISchema;
    props: PopupProps;
    parentSchema: ISchema;
    getPopupSchema?: (currentSchema: ISchema) => ISchema;
}) => void;
export declare const PagePopups: (props: {
    paramsList?: PopupParams[];
}) => React.JSX.Element;
export declare const useRequestSchema: () => {
    requestSchema: (uid: string) => Promise<import("@formily/json-schema").Stringify<{
        [key: symbol]: any;
        [key: `x-${string}`]: any;
        [key: `x-${number}`]: any;
        version?: string;
        name?: import("@formily/json-schema").SchemaKey;
        title?: any;
        description?: any;
        default?: any;
        readOnly?: boolean;
        writeOnly?: boolean;
        type?: import("@formily/json-schema").SchemaTypes;
        enum?: import("@formily/json-schema").SchemaEnum<any>;
        const?: any;
        multipleOf?: number;
        maximum?: number;
        exclusiveMaximum?: number;
        minimum?: number;
        exclusiveMinimum?: number;
        maxLength?: number;
        minLength?: number;
        pattern?: string | RegExp;
        maxItems?: number;
        minItems?: number;
        uniqueItems?: boolean;
        maxProperties?: number;
        minProperties?: number;
        required?: string | boolean | string[];
        format?: string;
        $ref?: string;
        $namespace?: string;
        definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
        properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
        items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any>;
        additionalItems?: import("@formily/json-schema").Stringify<any>;
        patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
        additionalProperties?: import("@formily/json-schema").Stringify<any>;
        "x-value"?: any;
        "x-index"?: number;
        "x-pattern"?: any;
        "x-display"?: any;
        "x-validator"?: any;
        "x-decorator"?: any;
        "x-decorator-props"?: any;
        "x-component"?: any;
        "x-component-props"?: any;
        "x-reactions"?: import("@formily/json-schema").SchemaReactions<any>;
        "x-content"?: any;
        "x-data"?: any;
        "x-visible"?: boolean;
        "x-hidden"?: boolean;
        "x-disabled"?: boolean;
        "x-editable"?: boolean;
        "x-read-only"?: boolean;
        "x-read-pretty"?: boolean;
        "x-compile-omitted"?: string[];
    }>>;
};
/**
 * The reason why we don't use the decoded data returned by useParams here is because we need the raw values.
 * @param location
 * @returns
 */
export declare const getPopupPath: (location: Location) => string;
export declare const useCurrentPopupContext: () => PopupProps;
export {};
