/**
 * Desktop Automation Manager
 *
 * Unified interface for mouse, keyboard, window, and application control.
 * Supports multiple backends (robotjs, nut.js, etc.) with mock for testing.
 */
import { EventEmitter } from 'events';
import type { MouseButton, MousePosition, MouseMoveOptions, MouseClickOptions, MouseDragOptions, MouseScrollOptions, KeyCode, KeyPressOptions, TypeOptions, HotkeySequence, WindowInfo, WindowSearchOptions, WindowSetOptions, AppInfo, AppLaunchOptions, ScreenInfo, ColorInfo, ClipboardContent, AutomationProvider, ProviderCapabilities, ProviderStatus, DesktopAutomationConfig } from './types.js';
export interface IAutomationProvider {
    readonly name: AutomationProvider;
    readonly capabilities: ProviderCapabilities;
    initialize(): Promise<void>;
    shutdown(): Promise<void>;
    isAvailable(): Promise<boolean>;
    getMousePosition(): Promise<MousePosition>;
    moveMouse(x: number, y: number, options?: MouseMoveOptions): Promise<void>;
    click(options?: MouseClickOptions): Promise<void>;
    doubleClick(button?: MouseButton): Promise<void>;
    rightClick(): Promise<void>;
    drag(fromX: number, fromY: number, toX: number, toY: number, options?: MouseDragOptions): Promise<void>;
    scroll(options: MouseScrollOptions): Promise<void>;
    keyPress(key: KeyCode, options?: KeyPressOptions): Promise<void>;
    keyDown(key: KeyCode): Promise<void>;
    keyUp(key: KeyCode): Promise<void>;
    type(text: string, options?: TypeOptions): Promise<void>;
    hotkey(sequence: HotkeySequence): Promise<void>;
    getActiveWindow(): Promise<WindowInfo | null>;
    getWindows(options?: WindowSearchOptions): Promise<WindowInfo[]>;
    getWindow(handle: string): Promise<WindowInfo | null>;
    focusWindow(handle: string): Promise<void>;
    minimizeWindow(handle: string): Promise<void>;
    maximizeWindow(handle: string): Promise<void>;
    restoreWindow(handle: string): Promise<void>;
    closeWindow(handle: string): Promise<void>;
    setWindow(handle: string, options: WindowSetOptions): Promise<void>;
    getRunningApps(): Promise<AppInfo[]>;
    launchApp(appPath: string, options?: AppLaunchOptions): Promise<AppInfo>;
    closeApp(pid: number): Promise<void>;
    getScreens(): Promise<ScreenInfo[]>;
    getPixelColor(x: number, y: number): Promise<ColorInfo>;
    getClipboard(): Promise<ClipboardContent>;
    setClipboard(content: Partial<ClipboardContent>): Promise<void>;
    clearClipboard(): Promise<void>;
}
export declare class MockAutomationProvider implements IAutomationProvider {
    readonly name: AutomationProvider;
    readonly capabilities: ProviderCapabilities;
    private mousePos;
    private mockWindows;
    private mockApps;
    private mockClipboard;
    private initialized;
    private windowIdCounter;
    private appPidCounter;
    initialize(): Promise<void>;
    shutdown(): Promise<void>;
    isAvailable(): Promise<boolean>;
    getMousePosition(): Promise<MousePosition>;
    moveMouse(x: number, y: number, options?: MouseMoveOptions): Promise<void>;
    click(_options?: MouseClickOptions): Promise<void>;
    doubleClick(_button?: MouseButton): Promise<void>;
    rightClick(): Promise<void>;
    drag(fromX: number, fromY: number, toX: number, toY: number, options?: MouseDragOptions): Promise<void>;
    scroll(_options: MouseScrollOptions): Promise<void>;
    keyPress(_key: KeyCode, _options?: KeyPressOptions): Promise<void>;
    keyDown(_key: KeyCode): Promise<void>;
    keyUp(_key: KeyCode): Promise<void>;
    type(text: string, options?: TypeOptions): Promise<void>;
    hotkey(_sequence: HotkeySequence): Promise<void>;
    getActiveWindow(): Promise<WindowInfo | null>;
    getWindows(options?: WindowSearchOptions): Promise<WindowInfo[]>;
    getWindow(handle: string): Promise<WindowInfo | null>;
    focusWindow(handle: string): Promise<void>;
    minimizeWindow(handle: string): Promise<void>;
    maximizeWindow(handle: string): Promise<void>;
    restoreWindow(handle: string): Promise<void>;
    closeWindow(handle: string): Promise<void>;
    setWindow(handle: string, options: WindowSetOptions): Promise<void>;
    getRunningApps(): Promise<AppInfo[]>;
    launchApp(appPath: string, _options?: AppLaunchOptions): Promise<AppInfo>;
    closeApp(pid: number): Promise<void>;
    getScreens(): Promise<ScreenInfo[]>;
    getPixelColor(x: number, y: number): Promise<ColorInfo>;
    getClipboard(): Promise<ClipboardContent>;
    setClipboard(content: Partial<ClipboardContent>): Promise<void>;
    clearClipboard(): Promise<void>;
    private simulateDelay;
    addMockWindow(window: WindowInfo): void;
    removeMockWindow(handle: string): void;
}
export declare class DesktopAutomationManager extends EventEmitter {
    private config;
    private provider;
    private providers;
    private failSafeActive;
    private lastActionTime;
    constructor(config?: Partial<DesktopAutomationConfig>);
    /**
     * Register a provider
     */
    registerProvider(provider: IAutomationProvider): void;
    /**
     * Initialize with the best available provider
     */
    initialize(): Promise<void>;
    /**
     * Shutdown
     */
    shutdown(): Promise<void>;
    /**
     * Get current provider status
     */
    getProviderStatus(): Promise<ProviderStatus | null>;
    /**
     * Get all provider statuses
     */
    getAllProviderStatuses(): Promise<ProviderStatus[]>;
    private checkSafety;
    private enforceDelay;
    private ensureProvider;
    getMousePosition(): Promise<MousePosition>;
    moveMouse(x: number, y: number, options?: MouseMoveOptions): Promise<void>;
    click(x?: number, y?: number, options?: MouseClickOptions): Promise<void>;
    doubleClick(x?: number, y?: number, button?: MouseButton): Promise<void>;
    rightClick(x?: number, y?: number): Promise<void>;
    drag(fromX: number, fromY: number, toX: number, toY: number, options?: MouseDragOptions): Promise<void>;
    scroll(options: MouseScrollOptions): Promise<void>;
    keyPress(key: KeyCode, options?: KeyPressOptions): Promise<void>;
    keyDown(key: KeyCode): Promise<void>;
    keyUp(key: KeyCode): Promise<void>;
    type(text: string, options?: TypeOptions): Promise<void>;
    hotkey(...keys: KeyCode[]): Promise<void>;
    getActiveWindow(): Promise<WindowInfo | null>;
    getWindows(options?: WindowSearchOptions): Promise<WindowInfo[]>;
    getWindow(handle: string): Promise<WindowInfo | null>;
    findWindow(titleOrProcess: string | RegExp): Promise<WindowInfo | null>;
    focusWindow(handle: string): Promise<void>;
    minimizeWindow(handle: string): Promise<void>;
    maximizeWindow(handle: string): Promise<void>;
    restoreWindow(handle: string): Promise<void>;
    closeWindow(handle: string): Promise<void>;
    setWindow(handle: string, options: WindowSetOptions): Promise<void>;
    moveWindow(handle: string, x: number, y: number): Promise<void>;
    resizeWindow(handle: string, width: number, height: number): Promise<void>;
    getRunningApps(): Promise<AppInfo[]>;
    launchApp(appPath: string, options?: AppLaunchOptions): Promise<AppInfo>;
    closeApp(pid: number): Promise<void>;
    findApp(name: string): Promise<AppInfo | null>;
    getScreens(): Promise<ScreenInfo[]>;
    getPrimaryScreen(): Promise<ScreenInfo | null>;
    getPixelColor(x: number, y: number): Promise<ColorInfo>;
    getClipboard(): Promise<ClipboardContent>;
    setClipboard(content: Partial<ClipboardContent>): Promise<void>;
    copyText(text: string): Promise<void>;
    getClipboardText(): Promise<string | undefined>;
    clearClipboard(): Promise<void>;
    getConfig(): DesktopAutomationConfig;
    updateConfig(config: Partial<DesktopAutomationConfig>): void;
    resetFailSafe(): void;
    /**
     * Get current provider
     */
    getProvider(): IAutomationProvider | null;
}
export declare function getDesktopAutomation(config?: Partial<DesktopAutomationConfig>): DesktopAutomationManager;
export declare function resetDesktopAutomation(): void;
