import { __classPrivateFieldGet, __classPrivateFieldSet, __esDecorate, __runInitializers } from "tslib";
import { AbstractSetting } from '@journeyapps-labs/reactor-mod';
import { observable, toJS } from 'mobx';
let StoredThemesSettings = (() => {
    var _a, _StoredThemesSettings_themes_accessor_storage;
    let _classSuper = AbstractSetting;
    let _themes_decorators;
    let _themes_initializers = [];
    let _themes_extraInitializers = [];
    return _a = class StoredThemesSettings extends _classSuper {
            get themes() { return __classPrivateFieldGet(this, _StoredThemesSettings_themes_accessor_storage, "f"); }
            set themes(value) { __classPrivateFieldSet(this, _StoredThemesSettings_themes_accessor_storage, value, "f"); }
            constructor() {
                super({
                    key: _a.KEY
                });
                _StoredThemesSettings_themes_accessor_storage.set(this, __runInitializers(this, _themes_initializers, void 0));
                __runInitializers(this, _themes_extraInitializers);
                this.themes = [];
            }
            reset() {
                this.themes.clear();
            }
            serialize() {
                return {
                    items: toJS(this.themes)
                };
            }
            deserialize(data) {
                this.themes.replace(data.items);
            }
        },
        _StoredThemesSettings_themes_accessor_storage = new WeakMap(),
        (() => {
            var _b;
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create((_b = _classSuper[Symbol.metadata]) !== null && _b !== void 0 ? _b : null) : void 0;
            _themes_decorators = [observable];
            __esDecorate(_a, null, _themes_decorators, { kind: "accessor", name: "themes", static: false, private: false, access: { has: obj => "themes" in obj, get: obj => obj.themes, set: (obj, value) => { obj.themes = value; } }, metadata: _metadata }, _themes_initializers, _themes_extraInitializers);
            if (_metadata) Object.defineProperty(_a, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        })(),
        _a.KEY = 'EDITOR_VS_THEMES',
        _a;
})();
export { StoredThemesSettings };
//# sourceMappingURL=StoredThemesSettings.js.map