import { registerEditorContribution, registerEditorAction, registerEditorCommand, EditorContributionInstantiation } from '../../../browser/editorExtensions.js';
import { editorConfigurationBaseNode } from '../../../common/config/editorConfigurationSchema.js';
import { CodeActionCommand, QuickFixAction, RefactorAction, SourceAction, OrganizeImportsAction, AutoFixAction, FixAllAction } from './codeActionCommands.js';
import { CodeActionController } from './codeActionController.js';
import { LightBulbWidget } from './lightBulbWidget.js';
import { localizeWithPath } from '../../../../nls.js';
import { Extensions, ConfigurationScope } from '../../../../platform/configuration/common/configurationRegistry.js';
import { Registry } from '../../../../platform/registry/common/platform.js';
const _moduleId = "vs/editor/contrib/codeAction/browser/codeActionContributions";
registerEditorContribution(CodeActionController.ID, CodeActionController, EditorContributionInstantiation.Eventually);
registerEditorContribution(LightBulbWidget.ID, LightBulbWidget, EditorContributionInstantiation.Lazy);
registerEditorAction(QuickFixAction);
registerEditorAction(RefactorAction);
registerEditorAction(SourceAction);
registerEditorAction(OrganizeImportsAction);
registerEditorAction(AutoFixAction);
registerEditorAction(FixAllAction);
registerEditorCommand(( (new CodeActionCommand())));
( (Registry.as(Extensions.Configuration))).registerConfiguration({
    ...editorConfigurationBaseNode,
    properties: {
        'editor.codeActionWidget.showHeaders': {
            type: 'boolean',
            scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,
            description: ( localizeWithPath(
                _moduleId,
                0,
                "Enable/disable showing group headers in the Code Action menu."
            )),
            default: true,
        },
    }
});
( (Registry.as(Extensions.Configuration))).registerConfiguration({
    ...editorConfigurationBaseNode,
    properties: {
        'editor.codeActionWidget.includeNearbyQuickFixes': {
            type: 'boolean',
            scope: ConfigurationScope.LANGUAGE_OVERRIDABLE,
            description: ( localizeWithPath(
                _moduleId,
                1,
                "Enable/disable showing nearest Quick Fix within a line when not currently on a diagnostic."
            )),
            default: true,
        },
    }
});
