import { EditorState, Extension, Compartment } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { DiffData, DiffThemeColors, LineMapping } from '../types';
import { DiffThemeManager } from '../themes';
import { ClassificationCounts } from '../extensions/diff-folding';
export interface ViewConfig {
    wordWrap: boolean;
    enableFolding: boolean;
    showClassification: boolean;
    wordDiffMode: 'word' | 'char' | 'none';
    dark: boolean;
    colors?: Partial<DiffThemeColors>;
    baseTheme?: Extension;
}
export declare abstract class BaseView {
    protected container: HTMLElement;
    protected rootEl: HTMLElement;
    protected config: ViewConfig;
    protected themeManager: DiffThemeManager;
    protected currentLineMap: LineMapping[];
    protected lineWrappingCompartment: Compartment;
    constructor(container: HTMLElement, config: ViewConfig);
    abstract render(diffData: DiffData, format: 'json' | 'yaml'): void;
    abstract updateTheme(dark: boolean, colors?: Partial<DiffThemeColors>, baseTheme?: Extension): void;
    abstract getEditorViews(): EditorView[];
    abstract setWordWrap(enabled: boolean): void;
    abstract destroy(): void;
    /**
     * Reconfigure line wrapping on a live editor view.
     */
    protected reconfigureLineWrapping(view: EditorView, enabled: boolean): void;
    /**
     * Build common extension array for any editor side.
     */
    protected createBaseExtensions(format: 'json' | 'yaml', side: 'before' | 'after' | 'unified', lineMap: LineMapping[]): Extension[];
    /**
     * Add word diff extension (for side-by-side mode).
     */
    protected createWordDiffExtension(): Extension[];
    /**
     * Add inline word diff extension (for unified mode).
     */
    protected createInlineWordDiffExtension(): Extension[];
    /**
     * Compute classification counts for a specific folded range.
     * Called by CodeMirror's `preparePlaceholder` with the exact fold range.
     * Only counts lines that have real content on this editor's side
     * (skips spacer lines from the opposite side).
     */
    protected prepareFoldPlaceholder(state: EditorState, range: {
        from: number;
        to: number;
    }, side: 'before' | 'after' | 'unified', lineMap: LineMapping[]): {
        counts: ClassificationCounts;
        isSpacer: boolean;
    };
    /**
     * Create a fold placeholder DOM element with classification counter badges.
     * Receives pre-computed classification counts from `prepareFoldPlaceholder`.
     */
    protected createFoldPlaceholder(prepared: {
        counts: ClassificationCounts;
        isSpacer: boolean;
    }, onclick?: (event: Event) => void): HTMLElement;
}
