import { registerEditorAction, EditorAction } from '../../../browser/editorExtensions.js';
import { CursorMoveCommands } from '../../../common/cursor/cursorMoveCommands.js';
import { EditorContextKeys } from '../../../common/editorContextKeys.js';
import { localizeWithPath } from '../../../../nls.js';
class ExpandLineSelectionAction extends EditorAction {
    constructor() {
        super({
            id: 'expandLineSelection',
            label: ( localizeWithPath(
                'vs/editor/contrib/lineSelection/browser/lineSelection',
                'expandLineSelection',
                "Expand Line Selection"
            )),
            alias: 'Expand Line Selection',
            precondition: undefined,
            kbOpts: {
                weight: 0 ,
                kbExpr: EditorContextKeys.textInputFocus,
                primary: 2048  | 42
            },
        });
    }
    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.revealAllCursors(args.source, true);
    }
}
registerEditorAction(ExpandLineSelectionAction);
export { ExpandLineSelectionAction };
