
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
import { toAction } from '../../../../base/common/actions.js';
import { CopyPasteController, pasteAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/copyPasteController.js';
import { DropIntoEditorController, dropAsPreferenceConfig } from '../../../../editor/contrib/dropOrPasteInto/browser/dropIntoEditorController.js';
import { localize } from '../../../../nls.js';
import { IPreferencesService } from '../../../services/preferences/common/preferences.service.js';

let DropOrPasteIntoCommands = class DropOrPasteIntoCommands {
    static {
        this.ID = "workbench.contrib.dropOrPasteInto";
    }
    constructor(_preferencesService) {
        this._preferencesService = _preferencesService;
        CopyPasteController.setConfigureDefaultAction(toAction({
            id: "workbench.action.configurePreferredPasteAction",
            label: ( localize(8723, "Configure preferred paste action...")),
            run: () => this.configurePreferredPasteAction()
        }));
        DropIntoEditorController.setConfigureDefaultAction(toAction({
            id: "workbench.action.configurePreferredDropAction",
            label: ( localize(8724, "Configure preferred drop action...")),
            run: () => this.configurePreferredDropAction()
        }));
    }
    configurePreferredPasteAction() {
        return this._preferencesService.openUserSettings({
            jsonEditor: true,
            revealSetting: {
                key: pasteAsPreferenceConfig,
                edit: true
            }
        });
    }
    configurePreferredDropAction() {
        return this._preferencesService.openUserSettings({
            jsonEditor: true,
            revealSetting: {
                key: dropAsPreferenceConfig,
                edit: true
            }
        });
    }
};
DropOrPasteIntoCommands = ( __decorate([( __param(0, IPreferencesService))], DropOrPasteIntoCommands));

export { DropOrPasteIntoCommands };
