
import { Codicon } from '../../base/common/codicons.js';
import { URI } from '../../base/common/uri.js';
import { EditOperation } from './core/editOperation.js';
import { Range } from './core/range.js';
import { TokenizationRegistry as TokenizationRegistry$1 } from './tokenizationRegistry.js';
import { localize } from '../../nls.js';

class Token {
    constructor(offset, type, language) {
        this.offset = offset;
        this.type = type;
        this.language = language;
        this._tokenBrand = undefined;
    }
    toString() {
        return '(' + this.offset + ', ' + this.type + ')';
    }
}
class TokenizationResult {
    constructor(tokens, endState) {
        this.tokens = tokens;
        this.endState = endState;
        this._tokenizationResultBrand = undefined;
    }
}
class EncodedTokenizationResult {
    constructor(
    tokens, endState) {
        this.tokens = tokens;
        this.endState = endState;
        this._encodedTokenizationResultBrand = undefined;
    }
}
var HoverVerbosityAction;
(function (HoverVerbosityAction) {
    HoverVerbosityAction[HoverVerbosityAction["Increase"] = 0] = "Increase";
    HoverVerbosityAction[HoverVerbosityAction["Decrease"] = 1] = "Decrease";
})(HoverVerbosityAction || (HoverVerbosityAction = {}));
var CompletionItemKind;
(function (CompletionItemKind) {
    CompletionItemKind[CompletionItemKind["Method"] = 0] = "Method";
    CompletionItemKind[CompletionItemKind["Function"] = 1] = "Function";
    CompletionItemKind[CompletionItemKind["Constructor"] = 2] = "Constructor";
    CompletionItemKind[CompletionItemKind["Field"] = 3] = "Field";
    CompletionItemKind[CompletionItemKind["Variable"] = 4] = "Variable";
    CompletionItemKind[CompletionItemKind["Class"] = 5] = "Class";
    CompletionItemKind[CompletionItemKind["Struct"] = 6] = "Struct";
    CompletionItemKind[CompletionItemKind["Interface"] = 7] = "Interface";
    CompletionItemKind[CompletionItemKind["Module"] = 8] = "Module";
    CompletionItemKind[CompletionItemKind["Property"] = 9] = "Property";
    CompletionItemKind[CompletionItemKind["Event"] = 10] = "Event";
    CompletionItemKind[CompletionItemKind["Operator"] = 11] = "Operator";
    CompletionItemKind[CompletionItemKind["Unit"] = 12] = "Unit";
    CompletionItemKind[CompletionItemKind["Value"] = 13] = "Value";
    CompletionItemKind[CompletionItemKind["Constant"] = 14] = "Constant";
    CompletionItemKind[CompletionItemKind["Enum"] = 15] = "Enum";
    CompletionItemKind[CompletionItemKind["EnumMember"] = 16] = "EnumMember";
    CompletionItemKind[CompletionItemKind["Keyword"] = 17] = "Keyword";
    CompletionItemKind[CompletionItemKind["Text"] = 18] = "Text";
    CompletionItemKind[CompletionItemKind["Color"] = 19] = "Color";
    CompletionItemKind[CompletionItemKind["File"] = 20] = "File";
    CompletionItemKind[CompletionItemKind["Reference"] = 21] = "Reference";
    CompletionItemKind[CompletionItemKind["Customcolor"] = 22] = "Customcolor";
    CompletionItemKind[CompletionItemKind["Folder"] = 23] = "Folder";
    CompletionItemKind[CompletionItemKind["TypeParameter"] = 24] = "TypeParameter";
    CompletionItemKind[CompletionItemKind["User"] = 25] = "User";
    CompletionItemKind[CompletionItemKind["Issue"] = 26] = "Issue";
    CompletionItemKind[CompletionItemKind["Snippet"] = 27] = "Snippet";
})(CompletionItemKind || (CompletionItemKind = {}));
var CompletionItemKinds;
(function (CompletionItemKinds) {
    const byKind = ( new Map());
    byKind.set(CompletionItemKind.Method, Codicon.symbolMethod);
    byKind.set(CompletionItemKind.Function, Codicon.symbolFunction);
    byKind.set(CompletionItemKind.Constructor, Codicon.symbolConstructor);
    byKind.set(CompletionItemKind.Field, Codicon.symbolField);
    byKind.set(CompletionItemKind.Variable, Codicon.symbolVariable);
    byKind.set(CompletionItemKind.Class, Codicon.symbolClass);
    byKind.set(CompletionItemKind.Struct, Codicon.symbolStruct);
    byKind.set(CompletionItemKind.Interface, Codicon.symbolInterface);
    byKind.set(CompletionItemKind.Module, Codicon.symbolModule);
    byKind.set(CompletionItemKind.Property, Codicon.symbolProperty);
    byKind.set(CompletionItemKind.Event, Codicon.symbolEvent);
    byKind.set(CompletionItemKind.Operator, Codicon.symbolOperator);
    byKind.set(CompletionItemKind.Unit, Codicon.symbolUnit);
    byKind.set(CompletionItemKind.Value, Codicon.symbolValue);
    byKind.set(CompletionItemKind.Enum, Codicon.symbolEnum);
    byKind.set(CompletionItemKind.Constant, Codicon.symbolConstant);
    byKind.set(CompletionItemKind.Enum, Codicon.symbolEnum);
    byKind.set(CompletionItemKind.EnumMember, Codicon.symbolEnumMember);
    byKind.set(CompletionItemKind.Keyword, Codicon.symbolKeyword);
    byKind.set(CompletionItemKind.Snippet, Codicon.symbolSnippet);
    byKind.set(CompletionItemKind.Text, Codicon.symbolText);
    byKind.set(CompletionItemKind.Color, Codicon.symbolColor);
    byKind.set(CompletionItemKind.File, Codicon.symbolFile);
    byKind.set(CompletionItemKind.Reference, Codicon.symbolReference);
    byKind.set(CompletionItemKind.Customcolor, Codicon.symbolCustomColor);
    byKind.set(CompletionItemKind.Folder, Codicon.symbolFolder);
    byKind.set(CompletionItemKind.TypeParameter, Codicon.symbolTypeParameter);
    byKind.set(CompletionItemKind.User, Codicon.account);
    byKind.set(CompletionItemKind.Issue, Codicon.issues);
    function toIcon(kind) {
        let codicon = byKind.get(kind);
        if (!codicon) {
            console.info('No codicon found for CompletionItemKind ' + kind);
            codicon = Codicon.symbolProperty;
        }
        return codicon;
    }
    CompletionItemKinds.toIcon = toIcon;
    const data = ( new Map());
    data.set('method', CompletionItemKind.Method);
    data.set('function', CompletionItemKind.Function);
    data.set('constructor', CompletionItemKind.Constructor);
    data.set('field', CompletionItemKind.Field);
    data.set('variable', CompletionItemKind.Variable);
    data.set('class', CompletionItemKind.Class);
    data.set('struct', CompletionItemKind.Struct);
    data.set('interface', CompletionItemKind.Interface);
    data.set('module', CompletionItemKind.Module);
    data.set('property', CompletionItemKind.Property);
    data.set('event', CompletionItemKind.Event);
    data.set('operator', CompletionItemKind.Operator);
    data.set('unit', CompletionItemKind.Unit);
    data.set('value', CompletionItemKind.Value);
    data.set('constant', CompletionItemKind.Constant);
    data.set('enum', CompletionItemKind.Enum);
    data.set('enum-member', CompletionItemKind.EnumMember);
    data.set('enumMember', CompletionItemKind.EnumMember);
    data.set('keyword', CompletionItemKind.Keyword);
    data.set('snippet', CompletionItemKind.Snippet);
    data.set('text', CompletionItemKind.Text);
    data.set('color', CompletionItemKind.Color);
    data.set('file', CompletionItemKind.File);
    data.set('reference', CompletionItemKind.Reference);
    data.set('customcolor', CompletionItemKind.Customcolor);
    data.set('folder', CompletionItemKind.Folder);
    data.set('type-parameter', CompletionItemKind.TypeParameter);
    data.set('typeParameter', CompletionItemKind.TypeParameter);
    data.set('account', CompletionItemKind.User);
    data.set('issue', CompletionItemKind.Issue);
    function fromString(value, strict) {
        let res = data.get(value);
        if (typeof res === 'undefined' && !strict) {
            res = CompletionItemKind.Property;
        }
        return res;
    }
    CompletionItemKinds.fromString = fromString;
})(CompletionItemKinds || (CompletionItemKinds = {}));
var CompletionItemTag;
(function (CompletionItemTag) {
    CompletionItemTag[CompletionItemTag["Deprecated"] = 1] = "Deprecated";
})(CompletionItemTag || (CompletionItemTag = {}));
var CompletionItemInsertTextRule;
(function (CompletionItemInsertTextRule) {
    CompletionItemInsertTextRule[CompletionItemInsertTextRule["None"] = 0] = "None";
    CompletionItemInsertTextRule[CompletionItemInsertTextRule["KeepWhitespace"] = 1] = "KeepWhitespace";
    CompletionItemInsertTextRule[CompletionItemInsertTextRule["InsertAsSnippet"] = 4] = "InsertAsSnippet";
})(CompletionItemInsertTextRule || (CompletionItemInsertTextRule = {}));
var PartialAcceptTriggerKind;
(function (PartialAcceptTriggerKind) {
    PartialAcceptTriggerKind[PartialAcceptTriggerKind["Word"] = 0] = "Word";
    PartialAcceptTriggerKind[PartialAcceptTriggerKind["Line"] = 1] = "Line";
    PartialAcceptTriggerKind[PartialAcceptTriggerKind["Suggest"] = 2] = "Suggest";
})(PartialAcceptTriggerKind || (PartialAcceptTriggerKind = {}));
var CompletionTriggerKind;
(function (CompletionTriggerKind) {
    CompletionTriggerKind[CompletionTriggerKind["Invoke"] = 0] = "Invoke";
    CompletionTriggerKind[CompletionTriggerKind["TriggerCharacter"] = 1] = "TriggerCharacter";
    CompletionTriggerKind[CompletionTriggerKind["TriggerForIncompleteCompletions"] = 2] = "TriggerForIncompleteCompletions";
})(CompletionTriggerKind || (CompletionTriggerKind = {}));
var InlineCompletionTriggerKind;
(function (InlineCompletionTriggerKind) {
    InlineCompletionTriggerKind[InlineCompletionTriggerKind["Automatic"] = 0] = "Automatic";
    InlineCompletionTriggerKind[InlineCompletionTriggerKind["Explicit"] = 1] = "Explicit";
})(InlineCompletionTriggerKind || (InlineCompletionTriggerKind = {}));
class SelectedSuggestionInfo {
    constructor(range, text, completionKind, isSnippetText) {
        this.range = range;
        this.text = text;
        this.completionKind = completionKind;
        this.isSnippetText = isSnippetText;
    }
    equals(other) {
        return Range.lift(this.range).equalsRange(other.range)
            && this.text === other.text
            && this.completionKind === other.completionKind
            && this.isSnippetText === other.isSnippetText;
    }
}
var CodeActionTriggerType;
(function (CodeActionTriggerType) {
    CodeActionTriggerType[CodeActionTriggerType["Invoke"] = 1] = "Invoke";
    CodeActionTriggerType[CodeActionTriggerType["Auto"] = 2] = "Auto";
})(CodeActionTriggerType || (CodeActionTriggerType = {}));
var DocumentPasteTriggerKind;
(function (DocumentPasteTriggerKind) {
    DocumentPasteTriggerKind[DocumentPasteTriggerKind["Automatic"] = 0] = "Automatic";
    DocumentPasteTriggerKind[DocumentPasteTriggerKind["PasteAs"] = 1] = "PasteAs";
})(DocumentPasteTriggerKind || (DocumentPasteTriggerKind = {}));
var SignatureHelpTriggerKind;
(function (SignatureHelpTriggerKind) {
    SignatureHelpTriggerKind[SignatureHelpTriggerKind["Invoke"] = 1] = "Invoke";
    SignatureHelpTriggerKind[SignatureHelpTriggerKind["TriggerCharacter"] = 2] = "TriggerCharacter";
    SignatureHelpTriggerKind[SignatureHelpTriggerKind["ContentChange"] = 3] = "ContentChange";
})(SignatureHelpTriggerKind || (SignatureHelpTriggerKind = {}));
var DocumentHighlightKind;
(function (DocumentHighlightKind) {
    DocumentHighlightKind[DocumentHighlightKind["Text"] = 0] = "Text";
    DocumentHighlightKind[DocumentHighlightKind["Read"] = 1] = "Read";
    DocumentHighlightKind[DocumentHighlightKind["Write"] = 2] = "Write";
})(DocumentHighlightKind || (DocumentHighlightKind = {}));
function isLocationLink(thing) {
    return thing
        && URI.isUri(thing.uri)
        && Range.isIRange(thing.range)
        && (Range.isIRange(thing.originSelectionRange) || Range.isIRange(thing.targetSelectionRange));
}
function isLocation(thing) {
    return thing
        && URI.isUri(thing.uri)
        && Range.isIRange(thing.range);
}
var SymbolKind;
(function (SymbolKind) {
    SymbolKind[SymbolKind["File"] = 0] = "File";
    SymbolKind[SymbolKind["Module"] = 1] = "Module";
    SymbolKind[SymbolKind["Namespace"] = 2] = "Namespace";
    SymbolKind[SymbolKind["Package"] = 3] = "Package";
    SymbolKind[SymbolKind["Class"] = 4] = "Class";
    SymbolKind[SymbolKind["Method"] = 5] = "Method";
    SymbolKind[SymbolKind["Property"] = 6] = "Property";
    SymbolKind[SymbolKind["Field"] = 7] = "Field";
    SymbolKind[SymbolKind["Constructor"] = 8] = "Constructor";
    SymbolKind[SymbolKind["Enum"] = 9] = "Enum";
    SymbolKind[SymbolKind["Interface"] = 10] = "Interface";
    SymbolKind[SymbolKind["Function"] = 11] = "Function";
    SymbolKind[SymbolKind["Variable"] = 12] = "Variable";
    SymbolKind[SymbolKind["Constant"] = 13] = "Constant";
    SymbolKind[SymbolKind["String"] = 14] = "String";
    SymbolKind[SymbolKind["Number"] = 15] = "Number";
    SymbolKind[SymbolKind["Boolean"] = 16] = "Boolean";
    SymbolKind[SymbolKind["Array"] = 17] = "Array";
    SymbolKind[SymbolKind["Object"] = 18] = "Object";
    SymbolKind[SymbolKind["Key"] = 19] = "Key";
    SymbolKind[SymbolKind["Null"] = 20] = "Null";
    SymbolKind[SymbolKind["EnumMember"] = 21] = "EnumMember";
    SymbolKind[SymbolKind["Struct"] = 22] = "Struct";
    SymbolKind[SymbolKind["Event"] = 23] = "Event";
    SymbolKind[SymbolKind["Operator"] = 24] = "Operator";
    SymbolKind[SymbolKind["TypeParameter"] = 25] = "TypeParameter";
})(SymbolKind || (SymbolKind = {}));
const symbolKindNames = {
    [SymbolKind.Array]: ( localize(752, "array")),
    [SymbolKind.Boolean]: ( localize(753, "boolean")),
    [SymbolKind.Class]: ( localize(754, "class")),
    [SymbolKind.Constant]: ( localize(755, "constant")),
    [SymbolKind.Constructor]: ( localize(756, "constructor")),
    [SymbolKind.Enum]: ( localize(757, "enumeration")),
    [SymbolKind.EnumMember]: ( localize(758, "enumeration member")),
    [SymbolKind.Event]: ( localize(759, "event")),
    [SymbolKind.Field]: ( localize(760, "field")),
    [SymbolKind.File]: ( localize(761, "file")),
    [SymbolKind.Function]: ( localize(762, "function")),
    [SymbolKind.Interface]: ( localize(763, "interface")),
    [SymbolKind.Key]: ( localize(764, "key")),
    [SymbolKind.Method]: ( localize(765, "method")),
    [SymbolKind.Module]: ( localize(766, "module")),
    [SymbolKind.Namespace]: ( localize(767, "namespace")),
    [SymbolKind.Null]: ( localize(768, "null")),
    [SymbolKind.Number]: ( localize(769, "number")),
    [SymbolKind.Object]: ( localize(770, "object")),
    [SymbolKind.Operator]: ( localize(771, "operator")),
    [SymbolKind.Package]: ( localize(772, "package")),
    [SymbolKind.Property]: ( localize(773, "property")),
    [SymbolKind.String]: ( localize(774, "string")),
    [SymbolKind.Struct]: ( localize(775, "struct")),
    [SymbolKind.TypeParameter]: ( localize(776, "type parameter")),
    [SymbolKind.Variable]: ( localize(777, "variable")),
};
function getAriaLabelForSymbol(symbolName, kind) {
    return localize(778, '{0} ({1})', symbolName, symbolKindNames[kind]);
}
var SymbolTag;
(function (SymbolTag) {
    SymbolTag[SymbolTag["Deprecated"] = 1] = "Deprecated";
})(SymbolTag || (SymbolTag = {}));
var SymbolKinds;
(function (SymbolKinds) {
    const byKind = ( new Map());
    byKind.set(SymbolKind.File, Codicon.symbolFile);
    byKind.set(SymbolKind.Module, Codicon.symbolModule);
    byKind.set(SymbolKind.Namespace, Codicon.symbolNamespace);
    byKind.set(SymbolKind.Package, Codicon.symbolPackage);
    byKind.set(SymbolKind.Class, Codicon.symbolClass);
    byKind.set(SymbolKind.Method, Codicon.symbolMethod);
    byKind.set(SymbolKind.Property, Codicon.symbolProperty);
    byKind.set(SymbolKind.Field, Codicon.symbolField);
    byKind.set(SymbolKind.Constructor, Codicon.symbolConstructor);
    byKind.set(SymbolKind.Enum, Codicon.symbolEnum);
    byKind.set(SymbolKind.Interface, Codicon.symbolInterface);
    byKind.set(SymbolKind.Function, Codicon.symbolFunction);
    byKind.set(SymbolKind.Variable, Codicon.symbolVariable);
    byKind.set(SymbolKind.Constant, Codicon.symbolConstant);
    byKind.set(SymbolKind.String, Codicon.symbolString);
    byKind.set(SymbolKind.Number, Codicon.symbolNumber);
    byKind.set(SymbolKind.Boolean, Codicon.symbolBoolean);
    byKind.set(SymbolKind.Array, Codicon.symbolArray);
    byKind.set(SymbolKind.Object, Codicon.symbolObject);
    byKind.set(SymbolKind.Key, Codicon.symbolKey);
    byKind.set(SymbolKind.Null, Codicon.symbolNull);
    byKind.set(SymbolKind.EnumMember, Codicon.symbolEnumMember);
    byKind.set(SymbolKind.Struct, Codicon.symbolStruct);
    byKind.set(SymbolKind.Event, Codicon.symbolEvent);
    byKind.set(SymbolKind.Operator, Codicon.symbolOperator);
    byKind.set(SymbolKind.TypeParameter, Codicon.symbolTypeParameter);
    function toIcon(kind) {
        let icon = byKind.get(kind);
        if (!icon) {
            console.info('No codicon found for SymbolKind ' + kind);
            icon = Codicon.symbolProperty;
        }
        return icon;
    }
    SymbolKinds.toIcon = toIcon;
    const byCompletionKind = ( new Map());
    byCompletionKind.set(SymbolKind.File, CompletionItemKind.File);
    byCompletionKind.set(SymbolKind.Module, CompletionItemKind.Module);
    byCompletionKind.set(SymbolKind.Namespace, CompletionItemKind.Module);
    byCompletionKind.set(SymbolKind.Package, CompletionItemKind.Module);
    byCompletionKind.set(SymbolKind.Class, CompletionItemKind.Class);
    byCompletionKind.set(SymbolKind.Method, CompletionItemKind.Method);
    byCompletionKind.set(SymbolKind.Property, CompletionItemKind.Property);
    byCompletionKind.set(SymbolKind.Field, CompletionItemKind.Field);
    byCompletionKind.set(SymbolKind.Constructor, CompletionItemKind.Constructor);
    byCompletionKind.set(SymbolKind.Enum, CompletionItemKind.Enum);
    byCompletionKind.set(SymbolKind.Interface, CompletionItemKind.Interface);
    byCompletionKind.set(SymbolKind.Function, CompletionItemKind.Function);
    byCompletionKind.set(SymbolKind.Variable, CompletionItemKind.Variable);
    byCompletionKind.set(SymbolKind.Constant, CompletionItemKind.Constant);
    byCompletionKind.set(SymbolKind.String, CompletionItemKind.Text);
    byCompletionKind.set(SymbolKind.Number, CompletionItemKind.Value);
    byCompletionKind.set(SymbolKind.Boolean, CompletionItemKind.Value);
    byCompletionKind.set(SymbolKind.Array, CompletionItemKind.Value);
    byCompletionKind.set(SymbolKind.Object, CompletionItemKind.Value);
    byCompletionKind.set(SymbolKind.Key, CompletionItemKind.Keyword);
    byCompletionKind.set(SymbolKind.Null, CompletionItemKind.Value);
    byCompletionKind.set(SymbolKind.EnumMember, CompletionItemKind.EnumMember);
    byCompletionKind.set(SymbolKind.Struct, CompletionItemKind.Struct);
    byCompletionKind.set(SymbolKind.Event, CompletionItemKind.Event);
    byCompletionKind.set(SymbolKind.Operator, CompletionItemKind.Operator);
    byCompletionKind.set(SymbolKind.TypeParameter, CompletionItemKind.TypeParameter);
    function toCompletionKind(kind) {
        let completionKind = byCompletionKind.get(kind);
        if (completionKind === undefined) {
            console.info('No completion kind found for SymbolKind ' + kind);
            completionKind = CompletionItemKind.File;
        }
        return completionKind;
    }
    SymbolKinds.toCompletionKind = toCompletionKind;
})(SymbolKinds || (SymbolKinds = {}));
class TextEdit {
    static asEditOperation(edit) {
        return EditOperation.replace(Range.lift(edit.range), edit.text);
    }
}
class FoldingRangeKind {
    static { this.Comment = ( new FoldingRangeKind('comment')); }
    static { this.Imports = ( new FoldingRangeKind('imports')); }
    static { this.Region = ( new FoldingRangeKind('region')); }
    static fromValue(value) {
        switch (value) {
            case 'comment': return FoldingRangeKind.Comment;
            case 'imports': return FoldingRangeKind.Imports;
            case 'region': return FoldingRangeKind.Region;
        }
        return ( new FoldingRangeKind(value));
    }
    constructor(value) {
        this.value = value;
    }
}
var NewSymbolNameTag;
(function (NewSymbolNameTag) {
    NewSymbolNameTag[NewSymbolNameTag["AIGenerated"] = 1] = "AIGenerated";
})(NewSymbolNameTag || (NewSymbolNameTag = {}));
var NewSymbolNameTriggerKind;
(function (NewSymbolNameTriggerKind) {
    NewSymbolNameTriggerKind[NewSymbolNameTriggerKind["Invoke"] = 0] = "Invoke";
    NewSymbolNameTriggerKind[NewSymbolNameTriggerKind["Automatic"] = 1] = "Automatic";
})(NewSymbolNameTriggerKind || (NewSymbolNameTriggerKind = {}));
var Command;
(function (Command) {
    function is(obj) {
        if (!obj || typeof obj !== 'object') {
            return false;
        }
        return typeof obj.id === 'string' &&
            typeof obj.title === 'string';
    }
    Command.is = is;
})(Command || (Command = {}));
var CommentThreadCollapsibleState;
(function (CommentThreadCollapsibleState) {
    CommentThreadCollapsibleState[CommentThreadCollapsibleState["Collapsed"] = 0] = "Collapsed";
    CommentThreadCollapsibleState[CommentThreadCollapsibleState["Expanded"] = 1] = "Expanded";
})(CommentThreadCollapsibleState || (CommentThreadCollapsibleState = {}));
var CommentThreadState;
(function (CommentThreadState) {
    CommentThreadState[CommentThreadState["Unresolved"] = 0] = "Unresolved";
    CommentThreadState[CommentThreadState["Resolved"] = 1] = "Resolved";
})(CommentThreadState || (CommentThreadState = {}));
var CommentThreadApplicability;
(function (CommentThreadApplicability) {
    CommentThreadApplicability[CommentThreadApplicability["Current"] = 0] = "Current";
    CommentThreadApplicability[CommentThreadApplicability["Outdated"] = 1] = "Outdated";
})(CommentThreadApplicability || (CommentThreadApplicability = {}));
var CommentMode;
(function (CommentMode) {
    CommentMode[CommentMode["Editing"] = 0] = "Editing";
    CommentMode[CommentMode["Preview"] = 1] = "Preview";
})(CommentMode || (CommentMode = {}));
var CommentState;
(function (CommentState) {
    CommentState[CommentState["Published"] = 0] = "Published";
    CommentState[CommentState["Draft"] = 1] = "Draft";
})(CommentState || (CommentState = {}));
var InlayHintKind;
(function (InlayHintKind) {
    InlayHintKind[InlayHintKind["Type"] = 1] = "Type";
    InlayHintKind[InlayHintKind["Parameter"] = 2] = "Parameter";
})(InlayHintKind || (InlayHintKind = {}));
class LazyTokenizationSupport {
    constructor(createSupport) {
        this.createSupport = createSupport;
        this._tokenizationSupport = null;
    }
    dispose() {
        if (this._tokenizationSupport) {
            this._tokenizationSupport.then((support) => {
                if (support) {
                    support.dispose();
                }
            });
        }
    }
    get tokenizationSupport() {
        if (!this._tokenizationSupport) {
            this._tokenizationSupport = this.createSupport();
        }
        return this._tokenizationSupport;
    }
}
const TokenizationRegistry = ( new TokenizationRegistry$1());
const TreeSitterTokenizationRegistry = ( new TokenizationRegistry$1());
var ExternalUriOpenerPriority;
(function (ExternalUriOpenerPriority) {
    ExternalUriOpenerPriority[ExternalUriOpenerPriority["None"] = 0] = "None";
    ExternalUriOpenerPriority[ExternalUriOpenerPriority["Option"] = 1] = "Option";
    ExternalUriOpenerPriority[ExternalUriOpenerPriority["Default"] = 2] = "Default";
    ExternalUriOpenerPriority[ExternalUriOpenerPriority["Preferred"] = 3] = "Preferred";
})(ExternalUriOpenerPriority || (ExternalUriOpenerPriority = {}));
var InlineEditTriggerKind;
(function (InlineEditTriggerKind) {
    InlineEditTriggerKind[InlineEditTriggerKind["Invoke"] = 0] = "Invoke";
    InlineEditTriggerKind[InlineEditTriggerKind["Automatic"] = 1] = "Automatic";
})(InlineEditTriggerKind || (InlineEditTriggerKind = {}));

export { CodeActionTriggerType, Command, CommentMode, CommentState, CommentThreadApplicability, CommentThreadCollapsibleState, CommentThreadState, CompletionItemInsertTextRule, CompletionItemKind, CompletionItemKinds, CompletionItemTag, CompletionTriggerKind, DocumentHighlightKind, DocumentPasteTriggerKind, EncodedTokenizationResult, ExternalUriOpenerPriority, FoldingRangeKind, HoverVerbosityAction, InlayHintKind, InlineCompletionTriggerKind, InlineEditTriggerKind, LazyTokenizationSupport, NewSymbolNameTag, NewSymbolNameTriggerKind, PartialAcceptTriggerKind, SelectedSuggestionInfo, SignatureHelpTriggerKind, SymbolKind, SymbolKinds, SymbolTag, TextEdit, Token, TokenizationRegistry, TokenizationResult, TreeSitterTokenizationRegistry, getAriaLabelForSymbol, isLocation, isLocationLink, symbolKindNames };
