"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const objects = require("../../base/common/objects.js");
exports.OverviewRulerLane = void 0;
(function(OverviewRulerLane) {
  OverviewRulerLane[OverviewRulerLane["Left"] = 1] = "Left";
  OverviewRulerLane[OverviewRulerLane["Center"] = 2] = "Center";
  OverviewRulerLane[OverviewRulerLane["Right"] = 4] = "Right";
  OverviewRulerLane[OverviewRulerLane["Full"] = 7] = "Full";
})(exports.OverviewRulerLane || (exports.OverviewRulerLane = {}));
exports.MinimapPosition = void 0;
(function(MinimapPosition) {
  MinimapPosition[MinimapPosition["Inline"] = 1] = "Inline";
  MinimapPosition[MinimapPosition["Gutter"] = 2] = "Gutter";
})(exports.MinimapPosition || (exports.MinimapPosition = {}));
exports.InjectedTextCursorStops = void 0;
(function(InjectedTextCursorStops) {
  InjectedTextCursorStops[InjectedTextCursorStops["Both"] = 0] = "Both";
  InjectedTextCursorStops[InjectedTextCursorStops["Right"] = 1] = "Right";
  InjectedTextCursorStops[InjectedTextCursorStops["Left"] = 2] = "Left";
  InjectedTextCursorStops[InjectedTextCursorStops["None"] = 3] = "None";
})(exports.InjectedTextCursorStops || (exports.InjectedTextCursorStops = {}));
class TextModelResolvedOptions {
  /**
   * @internal
   */
  constructor(src) {
    this._textModelResolvedOptionsBrand = void 0;
    this.tabSize = Math.max(1, src.tabSize | 0);
    this.indentSize = src.tabSize | 0;
    this.insertSpaces = Boolean(src.insertSpaces);
    this.defaultEOL = src.defaultEOL | 0;
    this.trimAutoWhitespace = Boolean(src.trimAutoWhitespace);
    this.bracketPairColorizationOptions = src.bracketPairColorizationOptions;
  }
  /**
   * @internal
   */
  equals(other) {
    return this.tabSize === other.tabSize && this.indentSize === other.indentSize && this.insertSpaces === other.insertSpaces && this.defaultEOL === other.defaultEOL && this.trimAutoWhitespace === other.trimAutoWhitespace && objects.equals(this.bracketPairColorizationOptions, other.bracketPairColorizationOptions);
  }
  /**
   * @internal
   */
  createChangeEvent(newOpts) {
    return {
      tabSize: this.tabSize !== newOpts.tabSize,
      indentSize: this.indentSize !== newOpts.indentSize,
      insertSpaces: this.insertSpaces !== newOpts.insertSpaces,
      trimAutoWhitespace: this.trimAutoWhitespace !== newOpts.trimAutoWhitespace
    };
  }
}
class FindMatch {
  /**
   * @internal
   */
  constructor(range, matches) {
    this._findMatchBrand = void 0;
    this.range = range;
    this.matches = matches;
  }
}
class ValidAnnotatedEditOperation {
  constructor(identifier, range, text, forceMoveMarkers, isAutoWhitespaceEdit, _isTracked) {
    this.identifier = identifier;
    this.range = range;
    this.text = text;
    this.forceMoveMarkers = forceMoveMarkers;
    this.isAutoWhitespaceEdit = isAutoWhitespaceEdit;
    this._isTracked = _isTracked;
  }
}
class SearchData {
  constructor(regex, wordSeparators, simpleSearch) {
    this.regex = regex;
    this.wordSeparators = wordSeparators;
    this.simpleSearch = simpleSearch;
  }
}
class ApplyEditsResult {
  constructor(reverseEdits, changes, trimAutoWhitespaceLineNumbers) {
    this.reverseEdits = reverseEdits;
    this.changes = changes;
    this.trimAutoWhitespaceLineNumbers = trimAutoWhitespaceLineNumbers;
  }
}
function shouldSynchronizeModel(model) {
  return !model.isTooLargeForSyncing() && !model.isForSimpleWidget;
}
exports.ApplyEditsResult = ApplyEditsResult;
exports.FindMatch = FindMatch;
exports.SearchData = SearchData;
exports.TextModelResolvedOptions = TextModelResolvedOptions;
exports.ValidAnnotatedEditOperation = ValidAnnotatedEditOperation;
exports.shouldSynchronizeModel = shouldSynchronizeModel;
