/**
 * Mouse Event Utilities
 * Provides trackpad/mouse scroll support.
 */
import { ESC } from './input.js';
export type MouseEventName = 'scroll-up' | 'scroll-down' | 'scroll-left' | 'scroll-right' | 'left-press' | 'left-release' | 'right-press' | 'right-release' | 'middle-press' | 'middle-release' | 'move';
export interface MouseEvent {
    name: MouseEventName;
    col: number;
    row: number;
    shift: boolean;
    meta: boolean;
    ctrl: boolean;
    button: 'left' | 'middle' | 'right' | 'none';
}
export type MouseHandler = (event: MouseEvent) => void | boolean;
/**
 * Enable mouse events in the terminal.
 * Uses SGR extended mouse mode for better coordinate handling.
 */
export declare function enableMouseEvents(): void;
/**
 * Disable mouse events in the terminal.
 */
export declare function disableMouseEvents(): void;
/**
 * Get mouse event name from button code
 *
 * NOTE: X11 mouse protocol limitation - all button releases report the same code (3),
 * so we cannot distinguish between left-release, middle-release, and right-release.
 * This function returns 'left-release' for all releases in X11 mode.
 * Consumers needing accurate release identification should track press state themselves.
 */
export declare function getMouseEventName(buttonCode: number, isRelease: boolean): MouseEventName | null;
/**
 * Parse SGR format mouse event
 */
export declare function parseSGRMouseEvent(buffer: string): {
    event: MouseEvent;
    length: number;
} | null;
/**
 * Parse X11 format mouse event
 */
export declare function parseX11MouseEvent(buffer: string): {
    event: MouseEvent;
    length: number;
} | null;
/**
 * Parse mouse event from buffer (tries both SGR and X11 formats)
 */
export declare function parseMouseEvent(buffer: string): {
    event: MouseEvent;
    length: number;
} | null;
/**
 * Check if buffer could be an incomplete mouse sequence
 */
export declare function isIncompleteMouseSequence(buffer: string): boolean;
export { ESC };
//# sourceMappingURL=mouse.d.ts.map