import { IDisposable } from "../../../base/common/lifecycle.js";
import { URI } from "../../../base/common/uri.js";
import { IWebWorkerServerRequestHandler } from "../../../base/common/worker/webWorker.js";
import { IRange } from "../core/range.js";
import { IMirrorTextModel, IModelChangedEvent } from "../model/mirrorTextModel.js";
import { IColorInformation, IInplaceReplaceSupportResult, ILink, TextEdit } from "../languages.js";
import { DiffAlgorithmName, IDiffComputationResult, IUnicodeHighlightsResult } from "./editorWorker.js";
import { UnicodeHighlighterOptions } from "./unicodeTextModelHighlighter.js";
import { IChange } from "../diff/legacyLinesDiffComputer.js";
import { ILinesDiffComputerOptions } from "../diff/linesDiffComputer.js";
import { IDocumentDiffProviderOptions } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/editor/common/diff/documentDiffProvider";
import { FindSectionHeaderOptions, SectionHeader } from "./findSectionHeaders.js";
import { IRawModelData, IWorkerTextModelSyncChannelServer } from "./textModelSync/textModelSync.protocol.js";
import { ICommonModel } from "./textModelSync/textModelSync.impl.js";
export interface IMirrorModel extends IMirrorTextModel {
    readonly uri: URI;
    readonly version: number;
    getValue(): string;
}
export interface IWorkerContext<H = undefined> {
    host: H;
    getMirrorModels(): IMirrorModel[];
}
export interface IWordRange {
    readonly start: number;
    readonly end: number;
}
export declare class EditorWorker implements IDisposable, IWorkerTextModelSyncChannelServer, IWebWorkerServerRequestHandler {
    private readonly _foreignModule;
    _requestHandlerBrand: any;
    private readonly _workerTextModelSyncServer;
    constructor(_foreignModule?: any | null);
    dispose(): void;
    $ping(): Promise<string>;
    protected _getModel(uri: string): ICommonModel | undefined;
    getModels(): ICommonModel[];
    $acceptNewModel(data: IRawModelData): void;
    $acceptModelChanged(uri: string, e: IModelChangedEvent): void;
    $acceptRemovedModel(uri: string): void;
    $computeUnicodeHighlights(url: string, options: UnicodeHighlighterOptions, range?: IRange): Promise<IUnicodeHighlightsResult>;
    $findSectionHeaders(url: string, options: FindSectionHeaderOptions): Promise<SectionHeader[]>;
    $computeDiff(originalUrl: string, modifiedUrl: string, options: IDocumentDiffProviderOptions, algorithm: DiffAlgorithmName): Promise<IDiffComputationResult | null>;
    private static computeDiff;
    private static _modelsAreIdentical;
    $computeDirtyDiff(originalUrl: string, modifiedUrl: string, ignoreTrimWhitespace: boolean): Promise<IChange[] | null>;
    private static readonly _diffLimit;
    $computeMoreMinimalEdits(modelUrl: string, edits: TextEdit[], pretty: boolean): Promise<TextEdit[]>;
    $computeHumanReadableDiff(modelUrl: string, edits: TextEdit[], options: ILinesDiffComputerOptions): TextEdit[];
    $computeLinks(modelUrl: string): Promise<ILink[] | null>;
    $computeDefaultDocumentColors(modelUrl: string): Promise<IColorInformation[] | null>;
    private static readonly _suggestionsLimit;
    $textualSuggest(modelUrls: string[], leadingWord: string | undefined, wordDef: string, wordDefFlags: string): Promise<{
        words: string[];
        duration: number;
    } | null>;
    $computeWordRanges(modelUrl: string, range: IRange, wordDef: string, wordDefFlags: string): Promise<{
        [word: string]: IRange[];
    }>;
    $navigateValueSet(modelUrl: string, range: IRange, up: boolean, wordDef: string, wordDefFlags: string): Promise<IInplaceReplaceSupportResult | null>;
    $fmr(method: string, args: any[]): Promise<any>;
}
