"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.bindArduinoPreferences = exports.createArduinoPreferences = exports.ArduinoPreferences = exports.ArduinoConfigSchema = void 0;
var preferences_1 = require("@theia/core/lib/browser/preferences");
exports.ArduinoConfigSchema = {
    'type': 'object',
    'properties': {
        'arduino.language.log': {
            'type': 'boolean',
            'description': "True if the Arduino Language Server should generate log files into the sketch folder. Otherwise, false. It's false by default.",
            'default': false
        },
        'arduino.compile.verbose': {
            'type': 'boolean',
            'description': 'True for verbose compile output.',
            'default': true
        },
        'arduino.upload.verbose': {
            'type': 'boolean',
            'description': 'True for verbose upload output.',
            'default': true
        },
        'arduino.upload.verify': {
            'type': 'boolean',
            'default': false
        },
        'arduino.window.autoScale': {
            'type': 'boolean',
            'description': 'True if the user interface automatically scales with the font size.',
            'default': true
        },
        'arduino.window.zoomLevel': {
            'type': 'number',
            'description': 'Adjust the zoom level of the window. The original size is 0 and each increment above (e.g. 1) or below (e.g. -1) represents zooming 20% larger or smaller. You can also enter decimals to adjust the zoom level with a finer granularity.',
            'default': 0
        },
        'arduino.ide.autoUpdate': {
            'type': 'boolean',
            'description': 'True to enable automatic update checks. The IDE will check for updates automatically and periodically.',
            'default': true
        }
    }
};
exports.ArduinoPreferences = Symbol('ArduinoPreferences');
function createArduinoPreferences(preferences) {
    return preferences_1.createPreferenceProxy(preferences, exports.ArduinoConfigSchema);
}
exports.createArduinoPreferences = createArduinoPreferences;
function bindArduinoPreferences(bind) {
    bind(exports.ArduinoPreferences).toDynamicValue(function (ctx) {
        var preferences = ctx.container.get(preferences_1.PreferenceService);
        return createArduinoPreferences(preferences);
    });
    bind(preferences_1.PreferenceContribution).toConstantValue({ schema: exports.ArduinoConfigSchema });
}
exports.bindArduinoPreferences = bindArduinoPreferences;
//# sourceMappingURL=arduino-preferences.js.map