
import { __decorate, __param } from '../../../../../../../external/tslib/tslib.es6.js';
import { Codicon } from '../../../../base/common/codicons.js';
import { Schemas } from '../../../../base/common/network.js';
import { URI } from '../../../../base/common/uri.js';
import { localize } from '../../../../nls.js';
import { registerIcon } from '../../../../platform/theme/common/iconRegistry.js';
import { EditorInput } from '../../../common/editor/editorInput.js';
import { IPreferencesService } from './preferences.service.js';

var SettingsEditor2Input_1;
const SettingsEditorIcon = registerIcon("settings-editor-label-icon", Codicon.settings, ( localize(17189, "Icon of the settings editor label.")));
let SettingsEditor2Input = class SettingsEditor2Input extends EditorInput {
    static {
        SettingsEditor2Input_1 = this;
    }
    static {
        this.ID = "workbench.input.settings2";
    }
    constructor(_preferencesService) {
        super();
        this.resource = ( URI.from({
            scheme: Schemas.vscodeSettings,
            path: `settingseditor`
        }));
        this._settingsModel = _preferencesService.createSettings2EditorModel();
    }
    matches(otherInput) {
        return super.matches(otherInput) || otherInput instanceof SettingsEditor2Input_1;
    }
    get typeId() {
        return SettingsEditor2Input_1.ID;
    }
    getName() {
        return localize(17190, "Settings");
    }
    getIcon() {
        return SettingsEditorIcon;
    }
    async resolve() {
        return this._settingsModel;
    }
    dispose() {
        this._settingsModel.dispose();
        super.dispose();
    }
};
SettingsEditor2Input = SettingsEditor2Input_1 = ( __decorate([( __param(0, IPreferencesService))], SettingsEditor2Input));
const PreferencesEditorIcon = registerIcon("preferences-editor-label-icon", Codicon.settings, ( localize(17191, "Icon of the preferences editor label.")));
class PreferencesEditorInput extends EditorInput {
    constructor() {
        super(...arguments);
        this.resource = ( URI.from({
            scheme: Schemas.vscodeSettings,
            path: `preferenceseditor`
        }));
    }
    static {
        this.ID = "workbench.input.preferences";
    }
    matches(otherInput) {
        return super.matches(otherInput) || otherInput instanceof PreferencesEditorInput;
    }
    get typeId() {
        return PreferencesEditorInput.ID;
    }
    getName() {
        return localize(17192, "Preferences");
    }
    getIcon() {
        return PreferencesEditorIcon;
    }
    async resolve() {
        return null;
    }
}

export { PreferencesEditorInput, SettingsEditor2Input };
