/**
 * Electron 窗口管理器 - 渲染进程模块
 * 提供窗口创建、管理、查询等功能
 *
 * @author Lynker Desktop Team
 * @version 1.0.0
 */
import { BVItem, BWItem, ElectronWindowsManagerOptions, PreloadWebContentsConfig } from '../common';
/**
 * 创建窗口
 * 支持创建 BrowserWindow 和 BrowserView
 *
 * @param options - 窗口创建选项
 * @returns Promise<BWItem | BVItem> 创建的窗口实例
 *
 * @example
 * ```typescript
 * // 创建 BrowserWindow
 * const window = await create({
 *   type: 'BW',
 *   name: 'main-window',
 *   url: 'https://example.com'
 * });
 *
 * // 创建 BrowserView
 * const view = await create({
 *   type: 'BV',
 *   name: 'sidebar-view',
 *   url: 'https://example.com/sidebar'
 * });
 * ```
 */
export declare function create(options: Omit<ElectronWindowsManagerOptions, 'type'> & {
    type?: 'BW';
}): Promise<BWItem>;
export declare function create(options: ElectronWindowsManagerOptions & {
    type: 'BV';
}): Promise<BVItem>;
export declare function create(options: ElectronWindowsManagerOptions): Promise<BWItem | BVItem>;
/**
 * 获取当前窗口实例
 *
 * @returns Promise<BWItem | BVItem | undefined> 当前窗口实例
 */
export declare const getCurrentWindow: () => Promise<BWItem | BVItem | undefined>;
/**
 * 根据 ID 或名称获取窗口
 *
 * @param idOrName - 窗口 ID 或名称
 * @returns Promise<BWItem | BVItem | undefined> 窗口实例
 *
 * @example
 * ```typescript
 * // 通过 ID 获取
 * const window = await get(1);
 *
 * // 通过名称获取
 * const window = await get('main-window');
 * ```
 */
export declare const get: (idOrName: string | number) => Promise<BWItem | BVItem | undefined>;
/**
 * 获取所有窗口
 * 支持按类型过滤
 *
 * @param type - 窗口类型过滤 ('BW' | 'BV')
 * @returns Promise<Map<number, BWItem | BVItem>> 窗口映射表
 *
 * @example
 * ```typescript
 * // 获取所有窗口
 * const allWindows = await getAll();
 *
 * // 只获取 BrowserWindow
 * const browserWindows = await getAll('BW');
 *
 * // 只获取 BrowserView
 * const browserViews = await getAll('BV');
 * ```
 */
export declare function getAll(type: 'BW'): Promise<Map<number, BWItem>>;
export declare function getAll(type: 'BV'): Promise<Map<number, BVItem>>;
export declare function getAll(): Promise<Map<number, BWItem | BVItem>>;
/**
 * 关闭指定窗口
 *
 * @param idOrName - 窗口 ID 或名称
 * @returns Promise<boolean> 操作是否成功
 */
export declare const close: (idOrName: string | number) => Promise<boolean>;
/**
 * 关闭所有窗口
 *
 * @returns Promise<boolean> 操作是否成功
 */
export declare const closeAll: () => Promise<boolean>;
/**
 * 根据 WebContents ID 查找对应的窗口
 *
 * @param webContentId - WebContents ID
 * @returns Promise<BWItem | BVItem | undefined> 窗口实例
 */
export declare const getWindowForWebContentId: (webContentId: number) => Promise<BWItem | BVItem | undefined>;
/**
 * 重命名窗口
 *
 * @param idOrName - 窗口 ID 或名称
 * @param newName - 新名称
 * @returns Promise<BWItem | BVItem | undefined> 重命名后的窗口实例
 */
export declare const rename: (idOrName: string | number, newName: string) => Promise<BWItem | BVItem | undefined>;
/**
 * 重置窗口初始化URL
 *
 * @param idOrName - 窗口 ID 或名称
 * @param url - 新URL
 * @returns Promise<BWItem | BVItem | undefined> 重置后的窗口实例
 */
export declare const reInitUrl: (idOrName: string | number, url: string) => Promise<BWItem | BVItem | undefined>;
/**
 * 设置预加载 WebContents 配置
 *
 * @param preloadWebContentsConfig - 预加载配置
 */
export declare const setPreloadWebContentsConfig: (preloadWebContentsConfig: PreloadWebContentsConfig) => Promise<void>;
/**
 * 获取预加载脚本路径
 * 使用缓存机制避免重复请求
 *
 * @returns Promise<string | undefined> 预加载脚本路径
 */
export declare const getPreload: () => Promise<string | undefined>;
//# sourceMappingURL=index.d.ts.map