import { Extension, StateField } from '@codemirror/state';
import { EditorView, WidgetType, GutterMarker } from '@codemirror/view';
import { DiffData } from '../types';
/** Effect to set foldable ranges from diff data */
export declare const setFoldableRangesEffect: import('@codemirror/state').StateEffectType<FoldableRange[]>;
/** Effect to toggle fold state of a block */
export declare const toggleFoldEffect: import('@codemirror/state').StateEffectType<string>;
/** Effect to expand all folds */
export declare const expandAllEffect: import('@codemirror/state').StateEffectType<void>;
/** Effect to collapse all folds */
export declare const collapseAllEffect: import('@codemirror/state').StateEffectType<void>;
/** Effect to auto-expand blocks with changes */
export declare const autoExpandChangesEffect: import('@codemirror/state').StateEffectType<void>;
/** A foldable range in the document */
export interface FoldableRange {
    blockId: string;
    from: number;
    to: number;
    hasChanges: boolean;
    changeCount: number;
    depth: number;
}
/** State field tracking foldable ranges */
export declare const foldableRangesField: StateField<FoldableRange[]>;
/** Widget shown when a region is folded */
declare class FoldWidget extends WidgetType {
    readonly lineCount: number;
    readonly hasChanges: boolean;
    readonly changeCount: number;
    constructor(lineCount: number, hasChanges: boolean, changeCount: number);
    toDOM(): HTMLElement;
    eq(other: WidgetType): boolean;
    ignoreEvent(): boolean;
}
/** Gutter marker for fold controls */
declare class FoldGutterMarker extends GutterMarker {
    readonly isFolded: boolean;
    readonly blockId: string;
    constructor(isFolded: boolean, blockId: string);
    toDOM(): HTMLElement;
    eq(other: GutterMarker): boolean;
}
/** Toggle fold at a specific range */
declare function toggleFoldAtRange(view: EditorView, range: FoldableRange): void;
/** Build foldable ranges from diff data */
export declare function buildFoldableRanges(doc: {
    lineCount: number;
    line: (n: number) => {
        from: number;
        to: number;
    };
}, diffData: DiffData, lineMap: Array<{
    blockId?: string;
}>): FoldableRange[];
/** Theme for fold styling */
export declare const diffFoldingTheme: Extension;
/** Keymap for fold operations */
export declare const diffFoldKeymap: {
    key: string;
    mac: string;
    run: (view: EditorView) => boolean;
}[];
/** Create the diff folding extension */
export declare function diffFolding(): Extension;
export { toggleFoldAtRange, FoldWidget, FoldGutterMarker };
