"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const editorExtensions = require("../../../browser/editorExtensions.js");
const cursorMoveCommands = require("../../../common/cursor/cursorMoveCommands.js");
const editorContextKeys = require("../../../common/editorContextKeys.js");
const nls = require("../../../../nls.js");
class ExpandLineSelectionAction extends editorExtensions.EditorAction {
  constructor() {
    super({
      id: "expandLineSelection",
      label: nls.localize("expandLineSelection", "Expand Line Selection"),
      alias: "Expand Line Selection",
      precondition: void 0,
      kbOpts: {
        weight: 0,
        kbExpr: editorContextKeys.EditorContextKeys.textInputFocus,
        primary: 2048 | 42
        /* KeyL */
      }
    });
  }
  run(_accessor, editor, args) {
    args = args || {};
    if (!editor.hasModel()) {
      return;
    }
    const viewModel = editor._getViewModel();
    viewModel.model.pushStackElement();
    viewModel.setCursorStates(args.source, 3, cursorMoveCommands.CursorMoveCommands.expandLineSelection(viewModel, viewModel.getCursorStates()));
    viewModel.revealPrimaryCursor(args.source, true);
  }
}
editorExtensions.registerEditorAction(ExpandLineSelectionAction);
exports.ExpandLineSelectionAction = ExpandLineSelectionAction;
