/**
 * 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 FlowEngine, FlowModel } from '@nocobase/flow-engine';
import React from 'react';
import type { NocoBaseDesktopRoute } from '../../../flow-compat';
import { AdminLayoutRouteCoordinator } from '../AdminLayoutRouteCoordinator';
import { BaseLayoutModel, type BaseLayoutStructure, type GetLayoutModelOptions } from '../BaseLayoutModel';
import { type AdminLayoutMenuItemModel } from './AdminLayoutMenuModels';
import { type AdminLayoutMenuRouteOptions } from './AdminLayoutMenuUtils';
export type AdminLayoutStructure = BaseLayoutStructure & {
    subModels: {
        menuItems?: AdminLayoutMenuItemModel[];
    };
};
type GetAdminLayoutModelOptions<TModel extends FlowModel = AdminLayoutModel> = GetLayoutModelOptions<TModel>;
/**
 * Admin Layout 的纯运行时 host model。
 *
 * 该模型只负责菜单树、页面路由桥接和上下文注入，
 * 不负责任何 React 渲染。
 *
 * @example
 * ```typescript
 * const model = getAdminLayoutModel(flowEngine, { required: true });
 * model.syncMenuRoutes(routes);
 * ```
 */
export declare class AdminLayoutModel extends BaseLayoutModel<AdminLayoutStructure> {
    menuRouteRefreshVersion: number;
    constructor(options: any);
    /**
     * 通知 Layout 重新生成 ProLayout 菜单路由。
     *
     * @returns {void}
     */
    refreshMenuRouteTree(): void;
    /**
     * 使用当前可访问菜单路由刷新 Layout 菜单树。
     *
     * @param {NocoBaseDesktopRoute[]} routes 当前用户可访问的桌面路由
     * @returns {void}
     */
    syncMenuRoutes(routes: NocoBaseDesktopRoute[]): void;
    /**
     * 将菜单模型转换为 ProLayout 路由树。
     *
     * @param {Omit<AdminLayoutMenuRouteOptions, 'depth'>} options 路由转换参数
     * @returns {{ path: string; children: any[] }} ProLayout 路由树
     */
    toProLayoutRoute(options: Omit<AdminLayoutMenuRouteOptions, 'depth'>): {
        path: string;
        children: import("./AdminLayoutMenuUtils").AdminLayoutMenuNode[];
    };
    protected createRouteCoordinator(): AdminLayoutRouteCoordinator;
    render(): React.JSX.Element;
}
/**
 * 获取或创建 admin-layout host model。
 *
 * @param {FlowEngine} flowEngine FlowEngine 实例
 * @param {GetAdminLayoutModelOptions<TModel>} options 获取选项
 * @returns {TModel | undefined} 命中的 admin-layout model
 * @throws {Error} 当 required 为 true 且模型不存在时抛错
 */
export declare function getAdminLayoutModel<TModel extends FlowModel = AdminLayoutModel>(flowEngine: FlowEngine, options?: GetAdminLayoutModelOptions<TModel>): TModel;
export {};
