"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InlineCompletionTriggerKind = exports.MonacoModelIdentifier = exports.DocumentIdentifier = exports.RangeSuggestDataDto = exports.ISuggestDataDtoField = exports.ISuggestResultDtoField = void 0;
exports.testGlob = testGlob;
const tslib_1 = require("tslib");
const glob_to_regexp_1 = tslib_1.__importDefault(require("glob-to-regexp"));
var ISuggestResultDtoField;
(function (ISuggestResultDtoField) {
    ISuggestResultDtoField["defaultRanges"] = "a";
    ISuggestResultDtoField["completions"] = "b";
    ISuggestResultDtoField["isIncomplete"] = "c";
    ISuggestResultDtoField["duration"] = "d";
})(ISuggestResultDtoField || (exports.ISuggestResultDtoField = ISuggestResultDtoField = {}));
var ISuggestDataDtoField;
(function (ISuggestDataDtoField) {
    ISuggestDataDtoField["label"] = "a";
    ISuggestDataDtoField["kind"] = "b";
    ISuggestDataDtoField["detail"] = "c";
    ISuggestDataDtoField["documentation"] = "d";
    ISuggestDataDtoField["sortText"] = "e";
    ISuggestDataDtoField["filterText"] = "f";
    ISuggestDataDtoField["preselect"] = "g";
    ISuggestDataDtoField["insertText"] = "h";
    ISuggestDataDtoField["insertTextRules"] = "i";
    ISuggestDataDtoField["range"] = "j";
    ISuggestDataDtoField["commitCharacters"] = "k";
    ISuggestDataDtoField["additionalTextEdits"] = "l";
    ISuggestDataDtoField["command"] = "m";
    ISuggestDataDtoField["kindModifier"] = "n";
})(ISuggestDataDtoField || (exports.ISuggestDataDtoField = ISuggestDataDtoField = {}));
var RangeSuggestDataDto;
(function (RangeSuggestDataDto) {
    function to(range) {
        return [range.startLineNumber, range.startColumn, range.endLineNumber, range.endColumn];
    }
    RangeSuggestDataDto.to = to;
})(RangeSuggestDataDto || (exports.RangeSuggestDataDto = RangeSuggestDataDto = {}));
function testGlob(pattern, value) {
    const regExp = (0, glob_to_regexp_1.default)(pattern, {
        extended: true,
        globstar: true,
    });
    return regExp.test(value);
}
var DocumentIdentifier;
(function (DocumentIdentifier) {
    function is(arg) {
        return !!arg && 'uri' in arg && 'languageId' in arg;
    }
    DocumentIdentifier.is = is;
})(DocumentIdentifier || (exports.DocumentIdentifier = DocumentIdentifier = {}));
var MonacoModelIdentifier;
(function (MonacoModelIdentifier) {
    function fromDocument(document) {
        return {
            uri: document.uri,
            languageId: document.languageId,
        };
    }
    MonacoModelIdentifier.fromDocument = fromDocument;
    function fromModel(model) {
        return {
            uri: model.uri,
            languageId: model.getLanguageId(),
        };
    }
    MonacoModelIdentifier.fromModel = fromModel;
})(MonacoModelIdentifier || (exports.MonacoModelIdentifier = MonacoModelIdentifier = {}));
/**
 * How an {@link InlineCompletionsProvider inline completion provider} was triggered.
 */
var InlineCompletionTriggerKind;
(function (InlineCompletionTriggerKind) {
    /**
     * Completion was triggered automatically while editing.
     * It is sufficient to return a single completion item in this case.
     */
    InlineCompletionTriggerKind[InlineCompletionTriggerKind["Automatic"] = 0] = "Automatic";
    /**
     * Completion was triggered explicitly by a user gesture.
     * Return multiple completion items to enable cycling through them.
     */
    InlineCompletionTriggerKind[InlineCompletionTriggerKind["Explicit"] = 1] = "Explicit";
})(InlineCompletionTriggerKind || (exports.InlineCompletionTriggerKind = InlineCompletionTriggerKind = {}));
// inline completion end
//# sourceMappingURL=languages.js.map