import { BaseDiffOptions, DiffLineAnnotation, ExpansionDirections, FileDiffMetadata, HunkData, HunkExpansionRegion, RenderDiffOptions, RenderRange, ThemeTypes, ThemedDiffResult } from "../types.js";
import { WorkerPoolManager } from "../worker/WorkerPoolManager.js";
import "../worker/index.js";
import { Element, ElementContent } from "hast";

//#region src/renderers/DiffHunksRenderer.d.ts
interface HunksRenderResult {
  unifiedGutterAST: ElementContent[] | undefined;
  unifiedContentAST: ElementContent[] | undefined;
  deletionsGutterAST: ElementContent[] | undefined;
  deletionsContentAST: ElementContent[] | undefined;
  additionsGutterAST: ElementContent[] | undefined;
  additionsContentAST: ElementContent[] | undefined;
  hunkData: HunkData[];
  css: string;
  preNode: Element;
  headerElement: Element | undefined;
  totalLines: number;
  themeStyles: string;
  baseThemeType: 'light' | 'dark' | undefined;
  rowCount: number;
  bufferBefore: number;
  bufferAfter: number;
}
declare class DiffHunksRenderer<LAnnotation = undefined> {
  options: BaseDiffOptions;
  private onRenderUpdate?;
  private workerManager?;
  readonly __id: string;
  private highlighter;
  private diff;
  private expandedHunks;
  private deletionAnnotations;
  private additionAnnotations;
  private computedLang;
  private renderCache;
  constructor(options?: BaseDiffOptions, onRenderUpdate?: (() => unknown) | undefined, workerManager?: WorkerPoolManager | undefined);
  cleanUp(): void;
  recycle(): void;
  setOptions(options: BaseDiffOptions): void;
  private mergeOptions;
  setThemeType(themeType: ThemeTypes): void;
  expandHunk(index: number, direction: ExpansionDirections): void;
  getExpandedHunk(hunkIndex: number): HunkExpansionRegion;
  getExpandedHunksMap(): Map<number, HunkExpansionRegion>;
  setLineAnnotations(lineAnnotations: DiffLineAnnotation<LAnnotation>[]): void;
  private getOptionsWithDefaults;
  private initializeHighlighter;
  hydrate(diff: FileDiffMetadata | undefined): void;
  private getRenderOptions;
  renderDiff(diff?: FileDiffMetadata | undefined, renderRange?: RenderRange): HunksRenderResult | undefined;
  asyncRender(diff: FileDiffMetadata, renderRange?: RenderRange): Promise<HunksRenderResult>;
  private createPreElement;
  private asyncHighlight;
  private renderDiffWithHighlighter;
  onHighlightSuccess(diff: FileDiffMetadata, result: ThemedDiffResult, options: RenderDiffOptions): void;
  onHighlightError(error: unknown): void;
  private processDiffResult;
  renderCodeAST(type: 'unified' | 'deletions' | 'additions', result: HunksRenderResult): ElementContent[] | undefined;
  renderFullAST(result: HunksRenderResult, children?: ElementContent[]): Element;
  renderFullHTML(result: HunksRenderResult, tempChildren?: ElementContent[]): string;
  renderPartialHTML(children: ElementContent[], columnType?: 'unified' | 'deletions' | 'additions'): string;
  private getAnnotations;
  private renderHeader;
}
//#endregion
export { DiffHunksRenderer, HunksRenderResult };
//# sourceMappingURL=DiffHunksRenderer.d.ts.map