var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
    function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
    var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
    var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
    var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
    var _, done = false;
    for (var i = decorators.length - 1; i >= 0; i--) {
        var context = {};
        for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
        for (var p in contextIn.access) context.access[p] = contextIn.access[p];
        context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
        var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
        if (kind === "accessor") {
            if (result === void 0) continue;
            if (result === null || typeof result !== "object") throw new TypeError("Object expected");
            if (_ = accept(result.get)) descriptor.get = _;
            if (_ = accept(result.set)) descriptor.set = _;
            if (_ = accept(result.init)) initializers.unshift(_);
        }
        else if (_ = accept(result)) {
            if (kind === "field") initializers.unshift(_);
            else descriptor[key] = _;
        }
    }
    if (target) Object.defineProperty(target, contextIn.name, descriptor);
    done = true;
};
var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
    var useValue = arguments.length > 2;
    for (var i = 0; i < initializers.length; i++) {
        value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
    }
    return useValue ? value : void 0;
};
import * as plugins from '../../plugins.js';
import { DcRouterDb } from '../classes.dcrouter-db.js';
const getDb = () => DcRouterDb.getInstance().getDb();
let RemoteIngressHubSettingsDoc = (() => {
    let _classDecorators = [plugins.smartdata.Collection(() => getDb())];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = plugins.smartdata.SmartDataDbDoc;
    let _settingsId_decorators;
    let _settingsId_initializers = [];
    let _settingsId_extraInitializers = [];
    let _enabled_decorators;
    let _enabled_initializers = [];
    let _enabled_extraInitializers = [];
    let _tunnelPort_decorators;
    let _tunnelPort_initializers = [];
    let _tunnelPort_extraInitializers = [];
    let _hubDomain_decorators;
    let _hubDomain_initializers = [];
    let _hubDomain_extraInitializers = [];
    let _performance_decorators;
    let _performance_initializers = [];
    let _performance_extraInitializers = [];
    let _updatedAt_decorators;
    let _updatedAt_initializers = [];
    let _updatedAt_extraInitializers = [];
    let _updatedBy_decorators;
    let _updatedBy_initializers = [];
    let _updatedBy_extraInitializers = [];
    var RemoteIngressHubSettingsDoc = class extends _classSuper {
        static { _classThis = this; }
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            _settingsId_decorators = [plugins.smartdata.unI(), plugins.smartdata.svDb()];
            _enabled_decorators = [plugins.smartdata.svDb()];
            _tunnelPort_decorators = [plugins.smartdata.svDb()];
            _hubDomain_decorators = [plugins.smartdata.svDb()];
            _performance_decorators = [plugins.smartdata.svDb()];
            _updatedAt_decorators = [plugins.smartdata.svDb()];
            _updatedBy_decorators = [plugins.smartdata.svDb()];
            __esDecorate(null, null, _settingsId_decorators, { kind: "field", name: "settingsId", static: false, private: false, access: { has: obj => "settingsId" in obj, get: obj => obj.settingsId, set: (obj, value) => { obj.settingsId = value; } }, metadata: _metadata }, _settingsId_initializers, _settingsId_extraInitializers);
            __esDecorate(null, null, _enabled_decorators, { kind: "field", name: "enabled", static: false, private: false, access: { has: obj => "enabled" in obj, get: obj => obj.enabled, set: (obj, value) => { obj.enabled = value; } }, metadata: _metadata }, _enabled_initializers, _enabled_extraInitializers);
            __esDecorate(null, null, _tunnelPort_decorators, { kind: "field", name: "tunnelPort", static: false, private: false, access: { has: obj => "tunnelPort" in obj, get: obj => obj.tunnelPort, set: (obj, value) => { obj.tunnelPort = value; } }, metadata: _metadata }, _tunnelPort_initializers, _tunnelPort_extraInitializers);
            __esDecorate(null, null, _hubDomain_decorators, { kind: "field", name: "hubDomain", static: false, private: false, access: { has: obj => "hubDomain" in obj, get: obj => obj.hubDomain, set: (obj, value) => { obj.hubDomain = value; } }, metadata: _metadata }, _hubDomain_initializers, _hubDomain_extraInitializers);
            __esDecorate(null, null, _performance_decorators, { kind: "field", name: "performance", static: false, private: false, access: { has: obj => "performance" in obj, get: obj => obj.performance, set: (obj, value) => { obj.performance = value; } }, metadata: _metadata }, _performance_initializers, _performance_extraInitializers);
            __esDecorate(null, null, _updatedAt_decorators, { kind: "field", name: "updatedAt", static: false, private: false, access: { has: obj => "updatedAt" in obj, get: obj => obj.updatedAt, set: (obj, value) => { obj.updatedAt = value; } }, metadata: _metadata }, _updatedAt_initializers, _updatedAt_extraInitializers);
            __esDecorate(null, null, _updatedBy_decorators, { kind: "field", name: "updatedBy", static: false, private: false, access: { has: obj => "updatedBy" in obj, get: obj => obj.updatedBy, set: (obj, value) => { obj.updatedBy = value; } }, metadata: _metadata }, _updatedBy_initializers, _updatedBy_extraInitializers);
            __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
            RemoteIngressHubSettingsDoc = _classThis = _classDescriptor.value;
            if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
            __runInitializers(_classThis, _classExtraInitializers);
        }
        settingsId = __runInitializers(this, _settingsId_initializers, 'remote-ingress-hub-settings');
        enabled = (__runInitializers(this, _settingsId_extraInitializers), __runInitializers(this, _enabled_initializers, void 0));
        tunnelPort = (__runInitializers(this, _enabled_extraInitializers), __runInitializers(this, _tunnelPort_initializers, void 0));
        hubDomain = (__runInitializers(this, _tunnelPort_extraInitializers), __runInitializers(this, _hubDomain_initializers, void 0));
        performance = (__runInitializers(this, _hubDomain_extraInitializers), __runInitializers(this, _performance_initializers, void 0));
        updatedAt = (__runInitializers(this, _performance_extraInitializers), __runInitializers(this, _updatedAt_initializers, 0));
        updatedBy = (__runInitializers(this, _updatedAt_extraInitializers), __runInitializers(this, _updatedBy_initializers, ''));
        constructor() {
            super();
            __runInitializers(this, _updatedBy_extraInitializers);
        }
        static async load() {
            return await RemoteIngressHubSettingsDoc.getInstance({ settingsId: 'remote-ingress-hub-settings' });
        }
    };
    return RemoteIngressHubSettingsDoc = _classThis;
})();
export { RemoteIngressHubSettingsDoc };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2xhc3Nlcy5yZW1vdGUtaW5ncmVzcy1odWItc2V0dGluZ3MuZG9jLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vdHMvZGIvZG9jdW1lbnRzL2NsYXNzZXMucmVtb3RlLWluZ3Jlc3MtaHViLXNldHRpbmdzLmRvYy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsT0FBTyxLQUFLLE9BQU8sTUFBTSxrQkFBa0IsQ0FBQztBQUM1QyxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFHdkQsTUFBTSxLQUFLLEdBQUcsR0FBRyxFQUFFLENBQUMsVUFBVSxDQUFDLFdBQVcsRUFBRSxDQUFDLEtBQUssRUFBRSxDQUFDO0lBR3hDLDJCQUEyQjs0QkFEdkMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxVQUFVLENBQUMsR0FBRyxFQUFFLENBQUMsS0FBSyxFQUFFLENBQUM7Ozs7c0JBQ0ssT0FBTyxDQUFDLFNBQVMsQ0FBQyxjQUFjOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzJDQUF4QyxTQUFRLFdBQTBGOzs7O3NDQUN4SSxPQUFPLENBQUMsU0FBUyxDQUFDLEdBQUcsRUFBRSxFQUN2QixPQUFPLENBQUMsU0FBUy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