import { SelectionSide } from "../types.js";

//#region src/managers/LineSelectionManager.d.ts
interface SelectedLineRange {
  start: number;
  side?: SelectionSide;
  end: number;
  endSide?: SelectionSide;
}
type GetLineIndexUtility = (lineNumber: number, side?: SelectionSide) => [number, number] | undefined;
interface LineSelectionOptions {
  enableLineSelection?: boolean;
  onLineSelected?: (range: SelectedLineRange | null) => void;
  onLineSelectionStart?: (range: SelectedLineRange | null) => void;
  onLineSelectionEnd?: (range: SelectedLineRange | null) => void;
  getLineIndex?: GetLineIndexUtility;
}
/**
 * Manages line selection state and interactions for code/diff viewers.
 * Handles:
 * - Click and drag selection
 * - Shift-click to extend selection
 * - DOM attribute updates (data-selected-line)
 */
declare class LineSelectionManager {
  private options;
  private pre;
  private selectedRange;
  private renderedSelectionRange;
  private anchor;
  private _queuedRender;
  constructor(options?: LineSelectionOptions);
  setOptions(options: LineSelectionOptions): void;
  cleanUp(): void;
  setup(pre: HTMLPreElement): void;
  setDirty(): void;
  isDirty(): boolean;
  setSelection(range: SelectedLineRange | null): void;
  getSelection(): SelectedLineRange | null;
  getLineIndex(lineNumber: number, side?: SelectionSide): [number, number] | undefined;
  private attachEventListeners;
  private removeEventListeners;
  private handleMouseDown;
  private handleMouseMove;
  private handleMouseUp;
  private updateSelection;
  private getIndexesFromSelection;
  private renderSelection;
  private notifySelectionChange;
  private notifySelectionStart;
  private notifySelectionEnd;
  private getMouseEventDataForPath;
  private getLineNumber;
  private parseLineIndex;
}
declare function pluckLineSelectionOptions({
  enableLineSelection,
  onLineSelected,
  onLineSelectionStart,
  onLineSelectionEnd
}: LineSelectionOptions, getLineIndex?: GetLineIndexUtility): LineSelectionOptions;
//#endregion
export { GetLineIndexUtility, LineSelectionManager, LineSelectionOptions, SelectedLineRange, pluckLineSelectionOptions };
//# sourceMappingURL=LineSelectionManager.d.ts.map