"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var themes = require("../themes");
var ADDED_TYPES = [];
function configureLanguage(settings, languageService) {
    var types = settings.types.join('\n').replace(/export declare/g, 'declare');
    if (!ADDED_TYPES.includes(types)) {
        languageService.addExtraLib(types);
        ADDED_TYPES.push(types);
    }
}
exports.configureLanguage = configureLanguage;
function configureTheme(theme) {
    switch (theme) {
        case 'DARK':
            monaco.editor.defineTheme('monokai', themes.dark);
            monaco.editor.setTheme('monokai');
            break;
        case 'LIGHT':
            monaco.editor.setTheme('vs-light');
            break;
        default:
            throw new Error("Theme '" + theme + "' not supported.");
    }
}
exports.configureTheme = configureTheme;
function configureTabSize(editor, tabSize) {
    var model = editor.getModel();
    model.updateOptions({ tabSize: tabSize });
}
exports.configureTabSize = configureTabSize;
//# sourceMappingURL=index.js.map