import { BrowserWindow, Rectangle as Bounds, WebContentsView } from "electron";
import { AppManifest, EdenConfig, WindowSize, ViewBounds } from "@edenapp/types";
import { ViewInfo, ViewMode } from "./types";
import { CommandRegistry, IPCBridge, EdenEmitter } from "../ipc";
/**
 * Events emitted by the ViewManager
 */
interface ViewManagerEvents {
    "view-loaded": {
        viewId: number;
        appId: string;
        overlay: boolean;
    };
    "view-load-failed": {
        viewId: number;
        appId: string;
        errorCode: number;
        errorDescription: string;
    };
    "mode-changed": {
        mode: "floating" | "tiled";
        bounds: ViewBounds;
    };
}
/**
 * ViewManager
 *
 * Central orchestrator for view management in Eden.
 */
export declare class ViewManager extends EdenEmitter<ViewManagerEvents> {
    private views;
    private mainWindow;
    private readonly tilingManager;
    private readonly floatingWindows;
    private readonly viewCreator;
    private readonly devToolsManager;
    private windowSize;
    private viewHandler;
    constructor(commandRegistry: CommandRegistry, ipcBridge: IPCBridge, config: EdenConfig, distPath: string);
    /**
     * Set the main window that will host the views
     */
    setMainWindow(window: BrowserWindow): void;
    /**
     * Set workspace bounds (the area where views can be placed)
     */
    setWorkspaceBounds(bounds: Bounds): void;
    setWindowSize(windowSize: WindowSize): void;
    getWindowSize(): WindowSize;
    /**
     * Create a view for an app or overlay
     */
    createView(appId: string, manifest: AppManifest, installPath: string, bounds: Bounds | undefined, launchArgs?: string[]): number;
    /**
     * Remove a view
     */
    removeView(viewId: number): void;
    /**
     * Update view bounds
     */
    setViewBounds(viewId: number, bounds: Bounds): void;
    /**
     * Get view by ID
     */
    getView(viewId: number): WebContentsView | undefined;
    /**
     * Get view info
     */
    getViewInfo(viewId: number): ViewInfo | undefined;
    /**
     * Find views by app ID
     */
    getViewsByAppId(appId: string): number[];
    /**
     * Get app ID from a webContents ID
     */
    getAppIdByWebContentsId(webContentsId: number): string | undefined;
    /**
     * Get view ID from a webContents ID
     */
    getViewIdByWebContentsId(webContentsId: number): number | undefined;
    /**
     * Get all views (as entries for iteration)
     */
    getAllViews(): [number, ViewInfo][];
    /**
     * Show a view (bring to front)
     */
    showView(viewId: number): void;
    /**
     * Hide a view by setting its bounds to zero
     */
    hideView(viewId: number): void;
    /**
     * Reorder all views to maintain proper layering
     */
    private reorderViewLayers;
    /**
     * Send message to view's webContents
     */
    sendToView(viewId: number, channel: string, ...args: any[]): boolean;
    /**
     * Get all active view IDs
     */
    getActiveViews(): number[];
    /**
     * Toggle or set view mode between tiled and floating
     */
    setViewMode(viewId: number, targetMode?: ViewMode): void;
}
export {};
//# sourceMappingURL=ViewManager.d.ts.map