import { SymbolInformation } from 'vscode-languageserver-types';
import { IChatFollowup, IChatReplyFollowup } from '@opensumi/ide-ai-native/lib/common';
import { IMarkdownString, IMarkerData, IRelatedInformation, IRelativePattern, ISelection, ProgressLocation as MainProgressLocation, MarkerSeverity, URI, Uri, UriComponents } from '@opensumi/ide-core-common';
import { ChatMessageRole as ChatMessageRoleEnum, IChatMessage } from '@opensumi/ide-core-common/lib/types/ai-native';
import * as debugModel from '@opensumi/ide-debug';
import { IEvaluatableExpression } from '@opensumi/ide-debug/lib/common/evaluatable-expression';
import { TrackedRangeStickiness } from '@opensumi/ide-editor/lib/common/editor';
import { CellKind } from '@opensumi/ide-editor/lib/common/notebook';
import { FileStat } from '@opensumi/ide-file-service';
import { ISerializedTestResults, ITestItem, ITestItemContext, ITestTag, SerializedTestErrorMessage } from '@opensumi/ide-testing/lib/common/testCollection';
import { CommandsConverter } from '../../hosted/api/vscode/ext.host.command';
import { VSDataTransfer } from './data-transfer';
import { ExtensionDocumentDataManager } from './doc';
import { ViewColumn as ViewColumnEnums } from './enums';
import * as types from './ext-types';
import { IInlineValueContextDto } from './languages';
import * as model from './model.api';
import { CodeActionTriggerType, EndOfLineSequence, RenderLineNumbersType } from './models';
import { TestItemImpl } from './testing/testApi';
import { DataTransferDTO } from './treeview';
import type { EditorGroupColumn, ICellRange, IContentDecorationRenderOptions, IDecorationRenderOptions, IThemeDecorationRenderOptions, LanguageSelector, NotebookCellInternalMetadata } from '@opensumi/ide-editor/lib/common';
import type * as languages from '@opensumi/monaco-editor-core/esm/vs/editor/common/languages';
import type vscode from 'vscode';
export interface TextEditorOpenOptions extends vscode.TextDocumentShowOptions {
    background?: boolean;
    override?: boolean;
}
export declare namespace TextEditorOpenOptions {
    function from(options?: TextEditorOpenOptions): any | /* ITextEditorOptions */ undefined;
}
export declare function toPosition(position: model.Position): types.Position;
export declare function fromPosition(position: types.Position): model.Position;
export declare namespace Range {
    function from(range: undefined): undefined;
    function from(range: vscode.Range): model.Range;
    function from(range: vscode.Range | undefined): model.Range | undefined;
    function to(range: undefined): undefined;
    function to(range: model.Range): types.Range;
    function to(range: model.Range | undefined): types.Range | undefined;
}
/**
 * @deprecated 之后使用 vscode 的形式 Range.from 代替
 * @param range
 */
export declare function fromRange(range: undefined): undefined;
export declare function fromRange(range: vscode.Range): model.Range;
/**
 * @deprecated 之后使用 vscode 的形式 Range.to 代替
 * @param range
 */
export declare function toRange(range: model.Range): types.Range;
export declare function fromMarkdown(markup: vscode.MarkdownString | vscode.MarkedString): model.IMarkdownString;
export declare namespace MarkdownString {
    function fromMany(markup: (vscode.MarkdownString | vscode.MarkedString)[]): IMarkdownString[];
    function from(markup: vscode.MarkdownString | vscode.MarkedString): IMarkdownString;
    function to(value: IMarkdownString): vscode.MarkdownString;
    function fromStrict(value: string | vscode.MarkdownString | undefined): undefined | string | IMarkdownString;
}
/**
 * @deprecated
 */
export declare function fromManyMarkdown(markup: (vscode.MarkdownString | vscode.MarkedString)[]): model.IMarkdownString[];
export declare namespace Hover {
    function from(hover: vscode.Hover): model.Hover;
    function to(info: model.Hover): types.Hover;
}
export declare function fromHover(hover: vscode.Hover): model.Hover;
export declare function fromLanguageSelector(selector: vscode.DocumentSelector): LanguageSelector | undefined;
export declare function fromGlobPattern(pattern: vscode.GlobPattern): string | IRelativePattern;
export declare namespace location {
    function from(value: vscode.Location): model.Location;
    function to(value: model.Location): types.Location;
}
/**
 * @deprecated
 */
export declare function fromLocation(value: vscode.Location): model.Location;
/**
 * @deprecated
 */
export declare function toLocation(value: model.Location): types.Location;
export declare namespace EndOfLine {
    function from(eol: vscode.EndOfLine): EndOfLineSequence | undefined;
    function to(eol: EndOfLineSequence): vscode.EndOfLine | undefined;
}
export declare namespace TextEdit {
    function from(edit: vscode.TextEdit): model.TextEdit;
    function to(edit: model.TextEdit): types.TextEdit;
}
export declare namespace SnippetTextEdit {
    function from(edit: vscode.SnippetTextEdit): model.TextEdit & {
        insertAsSnippet?: boolean;
    };
}
export declare function fromTextEdit(edit: vscode.TextEdit): model.SingleEditOperation;
export declare function fromDefinitionLink(definitionLink: vscode.DefinitionLink): model.DefinitionLink;
export declare function fromFoldingRange(foldingRange: vscode.FoldingRange): model.FoldingRange;
export declare function fromFoldingRangeKind(kind: vscode.FoldingRangeKind | undefined): model.FoldingRangeKind | undefined;
export declare function fromSelectionRange(obj: vscode.SelectionRange): model.SelectionRange;
export declare namespace ColorPresentation {
    function to(colorPresentation: model.IColorPresentation): types.ColorPresentation;
    function from(colorPresentation: vscode.ColorPresentation): model.IColorPresentation;
}
export declare namespace Color {
    function to(c: [number, number, number, number]): types.Color;
    function from(color: types.Color): [number, number, number, number];
}
/**
 * @deprecated
 */
export declare function fromColor(color: types.Color): [number, number, number, number];
export declare function toColor(color: [number, number, number, number]): types.Color;
/**
 * @description
 * @param colorPresentation
 */
export declare function fromColorPresentation(colorPresentation: vscode.ColorPresentation): model.ColorPresentation;
export declare namespace DocumentHighlight {
    function from(documentHighlight: vscode.DocumentHighlight): model.DocumentHighlight;
    function to(occurrence: model.DocumentHighlight): types.DocumentHighlight;
}
export declare function fromDocumentHighlightKind(kind?: vscode.DocumentHighlightKind): model.DocumentHighlightKind | undefined;
export declare namespace Diagnostic {
    function convertCode(code?: string | number | {
        value: string | number;
        target: Uri;
    }): string | undefined;
    function toMarker(diagnostic: vscode.Diagnostic): IMarkerData;
    function convertSeverity(severity: types.DiagnosticSeverity): MarkerSeverity;
    function convertRelatedInformation(diagnosticsRelatedInformation: vscode.DiagnosticRelatedInformation[] | undefined): IRelatedInformation[] | undefined;
}
export declare function toSelection(selection: model.Selection): types.Selection;
export declare function fromSelection(selection: vscode.Selection): model.Selection;
export declare namespace DocumentLink {
    function from(link: vscode.DocumentLink): model.ILink;
    function to(link: model.ILink): vscode.DocumentLink;
}
/**
 * @deprecated
 */
export declare function fromDocumentLink(link: vscode.DocumentLink): model.ILink;
export declare namespace Selection {
    function to(selection: ISelection): vscode.Selection;
    function from(selection: vscode.Selection): ISelection;
}
export declare namespace TextEditorLineNumbersStyle {
    function from(style: types.TextEditorLineNumbersStyle): RenderLineNumbersType;
    function to(style: RenderLineNumbersType): types.TextEditorLineNumbersStyle;
}
export declare namespace DecorationRenderOptions {
    function from(options: any): IDecorationRenderOptions;
}
export declare namespace ThemableDecorationRenderOptions {
    function from(options: vscode.ThemableDecorationRenderOptions): IThemeDecorationRenderOptions;
}
export declare namespace ThemableDecorationAttachmentRenderOptions {
    function from(options: vscode.ThemableDecorationAttachmentRenderOptions): IContentDecorationRenderOptions;
}
export declare namespace WorkspaceEdit {
    function from(value: vscode.WorkspaceEdit, documents?: ExtensionDocumentDataManager): model.WorkspaceEditDto;
    function to(value: model.WorkspaceEditDto): types.WorkspaceEdit;
}
export declare namespace DecorationRangeBehavior {
    function from(value: types.DecorationRangeBehavior): TrackedRangeStickiness | undefined;
}
export declare namespace GlobPattern {
    function from(pattern: vscode.GlobPattern): string | types.RelativePattern;
    function from(pattern: undefined): undefined;
    function from(pattern: null): null;
    function from(pattern: vscode.GlobPattern | undefined | null): string | types.RelativePattern | undefined | null;
}
export declare function pathOrURIToURI(value: string | types.Uri): types.Uri;
export declare namespace SymbolKind {
    function from(kind: vscode.SymbolKind): types.SymbolKind;
    function to(kind: types.SymbolKind): vscode.SymbolKind;
    /**
     * @deprecated
     */
    function fromSymbolKind(kind: vscode.SymbolKind): types.SymbolKind;
    /**
     * @deprecated
     */
    function toSymbolKind(kind: types.SymbolKind): vscode.SymbolKind;
}
export declare function fromDocumentSymbol(info: vscode.DocumentSymbol): model.DocumentSymbol;
export declare function fromSymbolInformation(symbolInformation: vscode.SymbolInformation): SymbolInformation | undefined;
export declare function toSymbolInformation(symbolInformation: SymbolInformation): vscode.SymbolInformation | undefined;
export declare namespace SymbolTag {
    function from(kind: types.SymbolTag): model.SymbolTag;
    function to(kind: model.SymbolTag): types.SymbolTag;
}
export declare namespace CompletionItemKind {
    function from(kind: types.CompletionItemKind): model.CompletionItemKind;
    function to(kind: model.CompletionItemKind): types.CompletionItemKind;
}
export declare namespace CompletionItem {
    function to(suggestion: model.CompletionItem, converter?: CommandsConverter): types.CompletionItem;
}
export declare namespace CompletionItemTag {
    function from(kind: types.CompletionItemTag): model.CompletionItemTag;
    function to(kind: model.CompletionItemTag): types.CompletionItemTag;
}
export declare function viewColumnToResourceOpenOptions(viewColumn?: ViewColumnEnums): {
    groupIndex?: number;
    relativeGroupIndex?: number;
};
export declare namespace WorkspaceSymbol {
    function from(info: vscode.SymbolInformation): model.IWorkspaceSymbol;
    function to(info: model.IWorkspaceSymbol): types.SymbolInformation;
}
export declare namespace Position {
    function to(position: model.Position): types.Position;
    function from(position: types.Position | vscode.Position): model.Position;
}
export declare namespace ProgressLocation {
    function from(loc: vscode.ProgressLocation | {
        viewId: string;
    }): MainProgressLocation | string;
}
export declare function fromFileStat(stat: vscode.FileStat, uri: types.Uri): FileStat;
export declare function toFileStat(stat: FileStat): vscode.FileStat;
export declare function isLikelyVscodeRange(thing: any): thing is types.Range;
export declare namespace CallHierarchyItem {
    function to(item: model.ICallHierarchyItemDto): types.CallHierarchyItem;
}
export declare namespace TypeHierarchyItem {
    function to(item: model.ITypeHierarchyItemDto): types.TypeHierarchyItem;
    function from(item: vscode.TypeHierarchyItem, sessionId?: string, itemId?: string): model.ITypeHierarchyItemDto;
}
export declare namespace CallHierarchyIncomingCall {
    function to(item: model.IIncomingCallDto): types.CallHierarchyIncomingCall;
}
export declare namespace CallHierarchyOutgoingCall {
    function to(item: model.IOutgoingCallDto): types.CallHierarchyOutgoingCall;
}
export declare namespace ParameterInformation {
    function from(info: types.ParameterInformation): model.ParameterInformation;
    function to(info: model.ParameterInformation): types.ParameterInformation;
}
export declare namespace SignatureInformation {
    function from(info: types.SignatureInformation): model.SignatureInformation;
    function to(info: model.SignatureInformation): types.SignatureInformation;
}
export declare namespace SignatureHelp {
    function from(help: types.SignatureHelp): model.SignatureHelp;
    function to(help: model.SignatureHelp): types.SignatureHelp;
}
export declare const ACTIVE_GROUP = -1;
export type ACTIVE_GROUP_TYPE = typeof ACTIVE_GROUP;
export declare const SIDE_GROUP = -2;
export type SIDE_GROUP_TYPE = typeof SIDE_GROUP;
export declare namespace ViewColumn {
    function from(column?: vscode.ViewColumn): EditorGroupColumn;
    function to(position: EditorGroupColumn): vscode.ViewColumn;
}
export declare namespace DefinitionLink {
    function from(value: vscode.Location | vscode.DefinitionLink): model.LocationLink;
    function to(value: model.LocationLink): vscode.LocationLink;
}
export declare namespace EvaluatableExpression {
    function from(expression: vscode.EvaluatableExpression): IEvaluatableExpression;
    function to(info: IEvaluatableExpression): types.EvaluatableExpression;
}
export declare namespace InlineValue {
    function from(inlineValue: vscode.InlineValue): debugModel.InlineValue;
    function to(inlineValue: debugModel.InlineValue): vscode.InlineValue;
}
export declare namespace InlineValueContext {
    function from(inlineValueContext: vscode.InlineValueContext): IInlineValueContextDto;
    function to(inlineValueContext: IInlineValueContextDto): types.InlineValueContext;
}
export declare namespace InlayHint {
    function from(hint: vscode.InlayHint): languages.InlayHint;
    function to(converter: CommandsConverter, hint: languages.InlayHint): vscode.InlayHint;
}
export declare namespace InlayHintLabelPart {
    function to(converter: CommandsConverter, part: languages.InlayHintLabelPart): types.InlayHintLabelPart;
}
export declare namespace InlayHintKind {
    function from(kind: vscode.InlayHintKind): languages.InlayHintKind;
    function to(kind: languages.InlayHintKind): vscode.InlayHintKind;
}
export declare namespace CodeActionTriggerKind {
    function to(value: CodeActionTriggerType): types.CodeActionTriggerKind;
}
export declare namespace TestMessage {
    function from(message: vscode.TestMessage): SerializedTestErrorMessage;
    function to(item: SerializedTestErrorMessage): vscode.TestMessage;
}
export interface TestMessageStackFrameDTO {
    uri: Uri | undefined;
    position: vscode.Position | undefined;
    label: string;
}
export declare namespace TestMessageStackFrame {
    function from(stackTrace: vscode.TestMessageStackFrame): TestMessageStackFrameDTO;
}
export declare namespace TestTag {
    const namespace: (ctrlId: string, tagId: string) => string;
    const denamespace: (namespaced: string) => {
        ctrlId: string;
        tagId: string;
    };
}
export declare namespace TestItem {
    type Raw = vscode.TestItem;
    function from(item: vscode.TestItem): ITestItem;
    function toPlain(item: ITestItem): Omit<vscode.TestItem, 'children' | 'invalidate' | 'discoverChildren'>;
    function toItemFromContext(context: ITestItemContext): TestItemImpl;
}
export declare namespace TestTag {
    function from(tag: vscode.TestTag): ITestTag;
    function to(tag: ITestTag): vscode.TestTag;
}
export declare namespace TestResults {
    function to(serialized: ISerializedTestResults): vscode.TestRunResult;
}
export interface IURITransformer {
    transformIncoming(uri: UriComponents): UriComponents;
    transformOutgoing(uri: UriComponents): UriComponents;
    transformOutgoingURI(uri: URI): URI;
    transformOutgoingScheme(scheme: string): string;
}
export interface IDocumentFilterDto {
    $serialized: true;
    language?: string;
    scheme?: string;
    pattern?: string | IRelativePattern;
    exclusive?: boolean;
}
export declare namespace DocumentSelector {
    function from(value: vscode.DocumentSelector, uriTransformer?: IURITransformer): IDocumentFilterDto[];
}
export interface IDataTransferFileDTO {
    readonly name: string;
    readonly uri?: UriComponents;
}
export interface DataTransferItemDTO {
    readonly id: string;
    readonly asString: string;
    readonly fileData: IDataTransferFileDTO | undefined;
}
export declare namespace DataTransferItem {
    function toDataTransferItem(item: DataTransferItemDTO, resolveFileData: () => Promise<Uint8Array>): types.DataTransferItem;
}
export declare namespace DataTransfer {
    function toDataTransfer(value: DataTransferDTO, resolveFileData: (itemId: string) => Promise<Uint8Array>): types.DataTransfer;
    function toDataTransferDTO(value: vscode.DataTransfer | VSDataTransfer): Promise<DataTransferDTO>;
}
export declare namespace ChatReplyFollowup {
    function from(followup: vscode.InteractiveSessionReplyFollowup | vscode.InteractiveEditorReplyFollowup): IChatReplyFollowup;
}
export declare namespace ChatFollowup {
    function from(followup: string | vscode.ChatAgentFollowup): IChatFollowup;
}
export declare namespace ChatMessage {
    function to(message: IChatMessage): vscode.ChatMessage;
    function from(message: vscode.ChatMessage): IChatMessage;
}
export declare namespace ChatMessageRole {
    function to(role: ChatMessageRoleEnum): vscode.ChatMessageRole;
    function from(role: vscode.ChatMessageRole): ChatMessageRoleEnum;
}
export declare namespace NotebookRange {
    function from(range: vscode.NotebookRange): ICellRange;
    function to(range: ICellRange): types.NotebookRange;
}
export declare namespace NotebookCellExecutionSummary {
    function to(data: NotebookCellInternalMetadata): vscode.NotebookCellExecutionSummary;
    function from(data: vscode.NotebookCellExecutionSummary): Partial<NotebookCellInternalMetadata>;
}
export declare namespace NotebookCellKind {
    function from(data: vscode.NotebookCellKind): CellKind;
    function to(data: CellKind): vscode.NotebookCellKind;
}
//# sourceMappingURL=converter.d.ts.map