/**
 * 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 React from 'react';
import { type NavigateFunction } from 'react-router-dom';
import type { NocoBaseDesktopRoute } from '../../../flow-compat';
import type { FlowContext } from '@nocobase/flow-engine';
/**
 * 菜单渲染期需要暴露当前路由，避免继续依赖旧 admin-shell 上下文。
 */
export declare const NocoBaseRouteContext: React.Context<NocoBaseDesktopRoute>;
/**
 * 菜单渲染期需要暴露父级路由，避免继续依赖旧 Menu 上下文。
 */
export declare const ParentRouteContext: React.Context<NocoBaseDesktopRoute>;
/**
 * 提供一个在 URL 变化时不会重新创建引用的 navigate。
 */
export declare const NavigateNoUpdateProvider: React.FC;
/**
 * 读取稳定引用的 navigate。
 */
export declare const useNavigateNoUpdate: () => NavigateFunction;
/**
 * 读取当前 Router 的 basename。
 */
export declare const useRouterBasename: () => string;
/**
 * 将查询参数拼接到 URL。
 */
export declare function appendQueryStringToUrl(url: string, queryString: string): string;
/**
 * 缩减大对象，避免把超大值拼到链接里。
 */
export declare function reduceValueSize(value: any): any;
/**
 * 补全站内 URL。
 */
export declare function completeURL(url: string, origin?: string): string;
/**
 * 在当前窗口内跳转链接。
 */
export declare function navigateWithinSelf(link: string, navigate: NavigateFunction, basePath?: string): void;
/**
 * 为标题补充 tooltip 图标。
 */
export declare const withTooltipComponent: (Component: React.FC) => (props: any) => React.JSX.Element;
/**
 * 在 flow 侧最小复刻变量作用域，避免继续依赖旧变量模块。
 */
export declare const VariableScopeContext: React.Context<{
    scopeId: string;
    type: string;
    parent?: any;
}>;
/**
 * 为菜单项提供变量作用域信息。
 */
export declare const VariableScope: React.FC<{
    scopeId: string;
    type: string;
}>;
export declare const REGEX_OF_VARIABLE: RegExp;
/**
 * 判断字符串是否为变量表达式。
 */
export declare const isVariable: (str: unknown) => boolean;
/**
 * 用 flow context 解析 badge 等轻量模板值。
 */
export declare const useEvaluatedExpression: (expression: string, context?: FlowContext) => string | number;
/**
 * 查找分组下首个可用页面。
 */
export declare function findFirstPageRoute(routes: NocoBaseDesktopRoute[]): any;
/**
 * 生成经典页面的默认 schema。
 */
export declare function getPageMenuSchema({ pageSchemaUid, tabSchemaUid, tabSchemaName, }: {
    pageSchemaUid: string;
    tabSchemaUid: string;
    tabSchemaName: string;
}): {
    type: string;
    'x-component': string;
    properties: {
        [x: string]: {
            type: string;
            'x-component': string;
            'x-initializer': string;
            properties: {};
            'x-uid': string;
            'x-async': boolean;
        };
    };
    'x-uid': string;
};
/**
 * 生成 v2 页面菜单的默认 schema。
 */
export declare function getFlowPageMenuSchema({ pageSchemaUid }: {
    pageSchemaUid: string;
}): {
    type: string;
    'x-component': string;
    'x-uid': string;
};
