import { Extension } from '@codemirror/state';
import { EditorView } from '@codemirror/view';
import { ComapreOptions, DiffType } from 'api-smart-diff';
import { DiffThemeColors, NavigationAPI, ChangeSummary } from './types';
import { DiffPath } from './utils/path';
import { TypedEventEmitter } from './utils/events';
/** Options for creating a DiffViewer */
export interface DiffViewerOptions {
    /** Display mode. Default: 'side-by-side' */
    mode?: 'side-by-side' | 'inline';
    /** Output format. Default: 'yaml' */
    format?: 'json' | 'yaml';
    /** Active diff type filters. Default: all types shown */
    filters?: DiffType[];
    /** Enable dark theme. Default: false */
    dark?: boolean;
    /** Base CodeMirror theme extension */
    theme?: Extension;
    /** Diff-specific color overrides */
    colors?: Partial<DiffThemeColors>;
    /** Enable code folding. Default: false */
    enableFolding?: boolean;
    /** Show classification indicators (gutter bars, fold counters, badges). Default: false */
    showClassification?: boolean;
    /** Word diff granularity. Default: 'word' */
    wordDiffMode?: 'word' | 'char' | 'none';
    /** Enable word wrapping. Default: true */
    wordWrap?: boolean;
    /** Use WebWorker for merging. Default: true */
    useWorker?: boolean;
    /** Custom worker URL. Default: inline blob */
    workerUrl?: string;
    /** api-smart-diff merge options override */
    mergeOptions?: ComapreOptions;
}
/** Events emitted by DiffViewer */
export type DiffViewerEvents = {
    loading: undefined;
    ready: {
        summary: ChangeSummary;
    };
    error: {
        message: string;
        cause?: unknown;
    };
    navigate: {
        path: string | null;
    };
    modeChange: {
        mode: 'side-by-side' | 'inline';
    };
    formatChange: {
        format: 'json' | 'yaml';
    };
    themeChange: {
        dark: boolean;
    };
    wordWrapChange: {
        wordWrap: boolean;
    };
};
export declare class DiffViewer extends TypedEventEmitter<DiffViewerEvents> {
    private container;
    private before;
    private after;
    private options;
    private currentView;
    private workerManager;
    private _navigation;
    private _coordinator;
    private _diffData;
    private _merged;
    private _changeSummary;
    private _loading;
    private _destroyed;
    constructor(container: HTMLElement, before: object | string, after: object | string, options?: DiffViewerOptions);
    destroy(): void;
    update(before: object | string, after: object | string): void;
    setMode(mode: 'side-by-side' | 'inline'): void;
    getMode(): 'side-by-side' | 'inline';
    setFormat(format: 'json' | 'yaml'): void;
    getFormat(): 'json' | 'yaml';
    setFilters(filters: DiffType[]): void;
    getFilters(): DiffType[];
    setTheme(options: {
        dark?: boolean;
        theme?: Extension;
        colors?: Partial<DiffThemeColors>;
    }): void;
    isDark(): boolean;
    setFoldingEnabled(enabled: boolean): void;
    setClassificationEnabled(enabled: boolean): void;
    setWordDiffMode(mode: 'word' | 'char' | 'none'): void;
    setWordWrap(enabled: boolean): void;
    getWordWrap(): boolean;
    expandAll(): void;
    collapseAll(): void;
    togglePath(path: DiffPath): void;
    get navigation(): NavigationAPI;
    getEditorViews(): {
        before?: EditorView;
        after?: EditorView;
        unified?: EditorView;
    };
    getChangeSummary(): ChangeSummary;
    private initAsync;
    private initSync;
    private parseInput;
    private buildDiffData;
    private rebuildView;
}
/**
 * Create a DiffViewer instance.
 *
 * @param container - DOM element to mount the diff viewer into
 * @param before - The "before" API spec (object or JSON/YAML string)
 * @param after - The "after" API spec (object or JSON/YAML string)
 * @param options - Configuration options
 * @returns A DiffViewer instance
 *
 * @example
 * ```typescript
 * import { createDiffViewer } from 'api-diff-viewer'
 * import 'api-diff-viewer/style.css'
 *
 * const viewer = createDiffViewer(
 *   document.getElementById('diff')!,
 *   openApiV1,
 *   openApiV2,
 *   { format: 'yaml', mode: 'side-by-side' }
 * )
 *
 * viewer.on('ready', ({ summary }) => {
 *   console.log(`${summary.breaking} breaking changes`)
 * })
 *
 * // Cleanup
 * viewer.destroy()
 * ```
 */
export declare function createDiffViewer(container: HTMLElement, before: object | string, after: object | string, options?: DiffViewerOptions): DiffViewer;
