import { registerEditorAction, EditorAction } from "../../../browser/editorExtensions.mjs";
import { CursorMoveCommands } from "../../../common/cursor/cursorMoveCommands.mjs";
import { EditorContextKeys } from "../../../common/editorContextKeys.mjs";
import { localize } from "../../../../nls.mjs";
class ExpandLineSelectionAction extends EditorAction {
  constructor() {
    super({
      id: "expandLineSelection",
      label: localize("expandLineSelection", "Expand Line Selection"),
      alias: "Expand Line Selection",
      precondition: void 0,
      kbOpts: {
        weight: 0,
        kbExpr: 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.expandLineSelection(viewModel, viewModel.getCursorStates()));
    viewModel.revealPrimaryCursor(args.source, true);
  }
}
registerEditorAction(ExpandLineSelectionAction);
export {
  ExpandLineSelectionAction
};
