/**
 * 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 type { BaseApplication } from '../../../BaseApplication';
import { type NocoBaseDesktopRoute } from '../../../flow-compat';
export type AdminRouteNavigationMode = 'spa' | 'document';
export type AdminRouteRuntimeTargetReason = 'ok' | 'missingSchemaUid' | 'unsupportedV2Runtime' | 'emptyGroup' | 'unsupportedRouteType';
export type AdminRouteRuntimeTarget = {
    runtimePath: string | null;
    navigationMode: AdminRouteNavigationMode;
    isLegacy: boolean;
    reason: AdminRouteRuntimeTargetReason;
};
type LocationLike = {
    pathname: string;
    search?: string;
    hash?: string;
};
type ResolveAdminRouteRuntimeTargetOptions = {
    app: Pick<BaseApplication<any>, 'getPublicPath'> & {
        router?: {
            getBasename?: () => string | undefined;
        };
    };
    route?: NocoBaseDesktopRoute;
    location?: LocationLike;
    preserveLocationState?: boolean;
    log?: (message?: any, ...optionalParams: any[]) => void;
};
export declare function isV2AdminRuntime(app?: ResolveAdminRouteRuntimeTargetOptions['app']): boolean;
export declare function toRouterNavigationPath(pathname: string, basename?: string): string;
export declare function isV2MenuRoute(route: NocoBaseDesktopRoute | undefined): boolean;
export declare function findFirstV2LandingRoute(routes: NocoBaseDesktopRoute[] | undefined): NocoBaseDesktopRoute | undefined;
export declare function findFirstAccessiblePageRoute(routes: NocoBaseDesktopRoute[] | undefined): NocoBaseDesktopRoute | undefined;
/**
 * 将 desktop route 解析为实际运行时跳转目标。
 *
 * @param {ResolveAdminRouteRuntimeTargetOptions} options 解析参数
 * @returns {AdminRouteRuntimeTarget} 运行时目标
 */
export declare function resolveAdminRouteRuntimeTarget(options: ResolveAdminRouteRuntimeTargetOptions): AdminRouteRuntimeTarget;
export {};
