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 { DeesElement, html, customElement, css, state, cssManager, } from '@design.estate/dees-element';
import * as appstate from '../../appstate.js';
import * as interfaces from '../../../dist_ts_interfaces/index.js';
import { viewHostCss } from '../shared/css.js';
import {} from '@design.estate/dees-catalog';
let OpsViewRemoteIngress = (() => {
    let _classDecorators = [customElement('ops-view-remoteingress')];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = DeesElement;
    let _riState_decorators;
    let _riState_initializers = [];
    let _riState_extraInitializers = [];
    var OpsViewRemoteIngress = class extends _classSuper {
        static { _classThis = this; }
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            _riState_decorators = [state()];
            __esDecorate(this, null, _riState_decorators, { kind: "accessor", name: "riState", static: false, private: false, access: { has: obj => "riState" in obj, get: obj => obj.riState, set: (obj, value) => { obj.riState = value; } }, metadata: _metadata }, _riState_initializers, _riState_extraInitializers);
            __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
            OpsViewRemoteIngress = _classThis = _classDescriptor.value;
            if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        #riState_accessor_storage = __runInitializers(this, _riState_initializers, appstate.remoteIngressStatePart.getState());
        get riState() { return this.#riState_accessor_storage; }
        set riState(value) { this.#riState_accessor_storage = value; }
        constructor() {
            super();
            __runInitializers(this, _riState_extraInitializers);
            const sub = appstate.remoteIngressStatePart.select().subscribe((newState) => {
                this.riState = newState;
            });
            this.rxSubscriptions.push(sub);
        }
        async connectedCallback() {
            await super.connectedCallback();
            await appstate.remoteIngressStatePart.dispatchAction(appstate.fetchRemoteIngressAction, null);
        }
        static styles = [
            cssManager.defaultStyles,
            viewHostCss,
            css `
      .remoteIngressContainer {
        display: flex;
        flex-direction: column;
        gap: 24px;
      }

      .statusBadge {
        display: inline-flex;
        align-items: center;
        padding: 3px 10px;
        border-radius: 12px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0.02em;
        text-transform: uppercase;
      }

      .statusBadge.connected {
        background: ${cssManager.bdTheme('#dcfce7', '#14532d')};
        color: ${cssManager.bdTheme('#166534', '#4ade80')};
      }

      .statusBadge.disconnected {
        background: ${cssManager.bdTheme('#fef2f2', '#450a0a')};
        color: ${cssManager.bdTheme('#991b1b', '#f87171')};
      }

      .statusBadge.disabled {
        background: ${cssManager.bdTheme('#f3f4f6', '#374151')};
        color: ${cssManager.bdTheme('#6b7280', '#9ca3af')};
      }

      .secretDialog {
        padding: 16px;
        background: ${cssManager.bdTheme('#fffbeb', '#1c1917')};
        border: 1px solid ${cssManager.bdTheme('#fbbf24', '#92400e')};
        border-radius: 8px;
        margin-bottom: 16px;
      }

      .secretDialog code {
        display: block;
        padding: 8px 12px;
        background: ${cssManager.bdTheme('#1f2937', '#111827')};
        color: #10b981;
        border-radius: 4px;
        font-family: monospace;
        font-size: 13px;
        word-break: break-all;
        margin: 8px 0;
        user-select: all;
      }

      .secretDialog .warning {
        font-size: 12px;
        color: ${cssManager.bdTheme('#92400e', '#fbbf24')};
        margin-top: 8px;
      }

      .portsDisplay {
        display: flex;
        gap: 4px;
        flex-wrap: wrap;
      }

      .portBadge {
        display: inline-flex;
        padding: 2px 8px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
        background: ${cssManager.bdTheme('#eff6ff', '#172554')};
        color: ${cssManager.bdTheme('#1e40af', '#60a5fa')};
      }

      .portBadge.manual {
        background: ${cssManager.bdTheme('#eff6ff', '#172554')};
        color: ${cssManager.bdTheme('#1e40af', '#60a5fa')};
      }

      .portBadge.derived {
        background: ${cssManager.bdTheme('#ecfdf5', '#022c22')};
        color: ${cssManager.bdTheme('#047857', '#34d399')};
        border: 1px dashed ${cssManager.bdTheme('#6ee7b7', '#065f46')};
      }

      .metricStack {
        display: flex;
        flex-direction: column;
        gap: 2px;
        font-size: 12px;
        line-height: 1.35;
      }

      .metricMuted {
        color: var(--text-muted, #6b7280);
      }
    `,
        ];
        render() {
            const totalEdges = this.riState.edges.length;
            const connectedEdges = this.riState.statuses.filter(s => s.connected).length;
            const disconnectedEdges = totalEdges - connectedEdges;
            const activeTunnels = this.riState.statuses.reduce((sum, s) => sum + s.activeTunnels, 0);
            const statsTiles = [
                {
                    id: 'totalEdges',
                    title: 'Total Edges',
                    type: 'number',
                    value: totalEdges,
                    icon: 'lucide:server',
                    description: 'Registered edge nodes',
                    color: '#3b82f6',
                },
                {
                    id: 'connectedEdges',
                    title: 'Connected',
                    type: 'number',
                    value: connectedEdges,
                    icon: 'lucide:link',
                    description: 'Currently connected edges',
                    color: '#10b981',
                },
                {
                    id: 'disconnectedEdges',
                    title: 'Disconnected',
                    type: 'number',
                    value: disconnectedEdges,
                    icon: 'lucide:unlink',
                    description: 'Offline edge nodes',
                    color: disconnectedEdges > 0 ? '#ef4444' : '#6b7280',
                },
                {
                    id: 'activeTunnels',
                    title: 'Active Tunnels',
                    type: 'number',
                    value: activeTunnels,
                    icon: 'lucide:cable',
                    description: 'Active client connections',
                    color: '#8b5cf6',
                },
            ];
            return html `
      <dees-heading level="3">Remote Ingress</dees-heading>

      ${this.riState.newEdgeId ? html `
        <div class="secretDialog">
          <strong>Edge created successfully!</strong>
          <div class="warning">Copy the connection token now. Use it with edge.start({ token: '...' }).</div>
          <dees-button
            @click=${async () => {
                const { DeesToast } = await import('@design.estate/dees-catalog');
                try {
                    const response = await appstate.fetchConnectionToken(this.riState.newEdgeId);
                    if (response.success && response.token) {
                        if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') {
                            await navigator.clipboard.writeText(response.token);
                        }
                        else {
                            const textarea = document.createElement('textarea');
                            textarea.value = response.token;
                            textarea.style.position = 'fixed';
                            textarea.style.opacity = '0';
                            document.body.appendChild(textarea);
                            textarea.select();
                            document.execCommand('copy');
                            document.body.removeChild(textarea);
                        }
                        DeesToast.show({ message: 'Connection token copied!', type: 'success', duration: 3000 });
                    }
                    else {
                        DeesToast.show({ message: response.message || 'Failed to get token', type: 'error', duration: 4000 });
                    }
                }
                catch (err) {
                    DeesToast.show({ message: `Failed: ${err.message}`, type: 'error', duration: 4000 });
                }
            }}
          >Copy Connection Token</dees-button>
          <dees-button
            @click=${() => appstate.remoteIngressStatePart.dispatchAction(appstate.clearNewEdgeIdAction, null)}
          >Dismiss</dees-button>
        </div>
      ` : ''}

      <div class="remoteIngressContainer">
        <dees-statsgrid .tiles=${statsTiles}></dees-statsgrid>

        <dees-table
          .heading1=${'Edge Nodes'}
          .heading2=${'Manage remote ingress edge registrations'}
          .data=${this.riState.edges}
          .rowKey=${'id'}
          .highlightUpdates=${'flash'}
          .showColumnFilters=${true}
          .displayFunction=${(edge) => ({
                name: edge.name,
                status: this.getEdgeStatusHtml(edge),
                transport: this.getTransportHtml(edge.id),
                publicIp: this.getEdgePublicIp(edge.id),
                ports: this.getPortsHtml(edge),
                tunnels: this.getEdgeTunnelCount(edge.id),
                maxConnections: this.getMaxConnectionsHtml(edge),
                window: this.getWindowHtml(edge.id),
                queues: this.getQueuesHtml(edge.id),
                traffic: this.getTrafficHtml(edge.id),
                lastHeartbeat: this.getLastHeartbeat(edge.id),
            })}
          .dataActions=${[
                {
                    name: 'Create Edge Node',
                    iconName: 'lucide:plus',
                    type: ['header'],
                    actionFunc: async () => {
                        const { DeesModal } = await import('@design.estate/dees-catalog');
                        const modal = await DeesModal.createAndShow({
                            heading: 'Create Edge Node',
                            content: html `
                    <dees-form>
                      <dees-input-text .key=${'name'} .label=${'Name'} .required=${true}></dees-input-text>
                      <dees-input-text .key=${'listenPorts'} .label=${'Manual Ports'} .description=${'Comma-separated port numbers, optional'}></dees-input-text>
                      <dees-input-checkbox .key=${'autoDerivePorts'} .label=${'Auto-derive ports from routes'} .value=${true}></dees-input-checkbox>
                      <dees-input-text .key=${'maxStreamsPerEdge'} .label=${'Max Connections'} .description=${'Optional maximum concurrent client connections for this edge. Leave empty to use the hub default.'}></dees-input-text>
                      <dees-input-text .key=${'tags'} .label=${'Tags'} .description=${'Comma-separated, optional'}></dees-input-text>
                    </dees-form>
                  `,
                            menuOptions: [
                                {
                                    name: 'Cancel',
                                    iconName: 'lucide:x',
                                    action: async (modalArg) => await modalArg.destroy(),
                                },
                                {
                                    name: 'Create',
                                    iconName: 'lucide:plus',
                                    action: async (modalArg) => {
                                        const form = modalArg.shadowRoot?.querySelector('.content')?.querySelector('dees-form');
                                        if (!form)
                                            return;
                                        const formData = await form.collectFormData();
                                        const name = formData.name;
                                        if (!name)
                                            return;
                                        const portsStr = formData.listenPorts?.trim();
                                        const listenPorts = portsStr
                                            ? portsStr.split(',').map((p) => parseInt(p.trim(), 10)).filter((p) => !isNaN(p))
                                            : undefined;
                                        const autoDerivePorts = formData.autoDerivePorts !== false;
                                        let performance;
                                        try {
                                            performance = this.collectPerformanceOverride(formData);
                                        }
                                        catch (err) {
                                            const { DeesToast } = await import('@design.estate/dees-catalog');
                                            DeesToast.show({ message: err.message, type: 'error', duration: 4000 });
                                            return;
                                        }
                                        const tags = formData.tags
                                            ? formData.tags.split(',').map((t) => t.trim()).filter(Boolean)
                                            : undefined;
                                        await appstate.remoteIngressStatePart.dispatchAction(appstate.createRemoteIngressAction, { name, listenPorts, autoDerivePorts, performance, tags });
                                        await modalArg.destroy();
                                    },
                                },
                            ],
                        });
                    },
                },
                {
                    name: 'Enable',
                    iconName: 'lucide:play',
                    type: ['inRow', 'contextmenu'],
                    actionRelevancyCheckFunc: (actionData) => !actionData.item.enabled,
                    actionFunc: async (actionData) => {
                        const edge = actionData.item;
                        await appstate.remoteIngressStatePart.dispatchAction(appstate.toggleRemoteIngressAction, { id: edge.id, enabled: true });
                    },
                },
                {
                    name: 'Disable',
                    iconName: 'lucide:pause',
                    type: ['inRow', 'contextmenu'],
                    actionRelevancyCheckFunc: (actionData) => actionData.item.enabled,
                    actionFunc: async (actionData) => {
                        const edge = actionData.item;
                        await appstate.remoteIngressStatePart.dispatchAction(appstate.toggleRemoteIngressAction, { id: edge.id, enabled: false });
                    },
                },
                {
                    name: 'Edit',
                    iconName: 'lucide:pencil',
                    type: ['inRow', 'contextmenu'],
                    actionFunc: async (actionData) => {
                        const edge = actionData.item;
                        const { DeesModal } = await import('@design.estate/dees-catalog');
                        await DeesModal.createAndShow({
                            heading: `Edit Edge: ${edge.name}`,
                            content: html `
                    <dees-form>
                      <dees-input-text .key=${'name'} .label=${'Name'} .value=${edge.name}></dees-input-text>
                      <dees-input-text .key=${'listenPorts'} .label=${'Manual Ports'} .description=${'Comma-separated port numbers'} .value=${(edge.listenPorts || []).join(', ')}></dees-input-text>
                      <dees-input-checkbox .key=${'autoDerivePorts'} .label=${'Auto-derive ports from routes'} .value=${edge.autoDerivePorts !== false}></dees-input-checkbox>
                      <dees-input-text .key=${'maxStreamsPerEdge'} .label=${'Max Connections'} .description=${'Optional maximum concurrent client connections for this edge. Leave empty to use the hub default.'} .value=${edge.performance?.maxStreamsPerEdge?.toString() || ''}></dees-input-text>
                      <dees-input-text .key=${'tags'} .label=${'Tags'} .description=${'Comma-separated'} .value=${(edge.tags || []).join(', ')}></dees-input-text>
                    </dees-form>
                  `,
                            menuOptions: [
                                {
                                    name: 'Cancel',
                                    iconName: 'lucide:x',
                                    action: async (modalArg) => await modalArg.destroy(),
                                },
                                {
                                    name: 'Save',
                                    iconName: 'lucide:check',
                                    action: async (modalArg) => {
                                        const form = modalArg.shadowRoot?.querySelector('.content')?.querySelector('dees-form');
                                        if (!form)
                                            return;
                                        const formData = await form.collectFormData();
                                        const portsStr = formData.listenPorts?.trim();
                                        const listenPorts = portsStr
                                            ? portsStr.split(',').map((p) => parseInt(p.trim(), 10)).filter((p) => !isNaN(p))
                                            : [];
                                        const autoDerivePorts = formData.autoDerivePorts !== false;
                                        let performance;
                                        try {
                                            performance = this.collectPerformanceOverride(formData, edge.performance);
                                        }
                                        catch (err) {
                                            const { DeesToast } = await import('@design.estate/dees-catalog');
                                            DeesToast.show({ message: err.message, type: 'error', duration: 4000 });
                                            return;
                                        }
                                        const tags = formData.tags
                                            ? formData.tags.split(',').map((t) => t.trim()).filter(Boolean)
                                            : [];
                                        await appstate.remoteIngressStatePart.dispatchAction(appstate.updateRemoteIngressAction, {
                                            id: edge.id,
                                            name: formData.name || edge.name,
                                            listenPorts,
                                            autoDerivePorts,
                                            performance,
                                            tags,
                                        });
                                        await modalArg.destroy();
                                    },
                                },
                            ],
                        });
                    },
                },
                {
                    name: 'Regenerate Secret',
                    iconName: 'lucide:key',
                    type: ['inRow', 'contextmenu'],
                    actionFunc: async (actionData) => {
                        const edge = actionData.item;
                        await appstate.remoteIngressStatePart.dispatchAction(appstate.regenerateRemoteIngressSecretAction, edge.id);
                    },
                },
                {
                    name: 'Copy Token',
                    iconName: 'lucide:ClipboardCopy',
                    type: ['inRow', 'contextmenu'],
                    actionFunc: async (actionData) => {
                        const edge = actionData.item;
                        const { DeesToast } = await import('@design.estate/dees-catalog');
                        try {
                            const response = await appstate.fetchConnectionToken(edge.id);
                            if (response.success && response.token) {
                                // Use clipboard API with fallback for non-HTTPS contexts
                                if (navigator.clipboard && typeof navigator.clipboard.writeText === 'function') {
                                    await navigator.clipboard.writeText(response.token);
                                }
                                else {
                                    const textarea = document.createElement('textarea');
                                    textarea.value = response.token;
                                    textarea.style.position = 'fixed';
                                    textarea.style.opacity = '0';
                                    document.body.appendChild(textarea);
                                    textarea.select();
                                    document.execCommand('copy');
                                    document.body.removeChild(textarea);
                                }
                                DeesToast.show({ message: `Connection token copied for ${edge.name}`, type: 'success', duration: 3000 });
                            }
                            else {
                                DeesToast.show({ message: response.message || 'Failed to get token', type: 'error', duration: 4000 });
                            }
                        }
                        catch (err) {
                            DeesToast.show({ message: `Failed: ${err.message}`, type: 'error', duration: 4000 });
                        }
                    },
                },
                {
                    name: 'Delete',
                    iconName: 'lucide:trash2',
                    type: ['inRow', 'contextmenu'],
                    actionFunc: async (actionData) => {
                        const edge = actionData.item;
                        await appstate.remoteIngressStatePart.dispatchAction(appstate.deleteRemoteIngressAction, edge.id);
                    },
                },
            ]}
        ></dees-table>
      </div>
    `;
        }
        getEdgeStatus(edgeId) {
            return this.riState.statuses.find(s => s.edgeId === edgeId);
        }
        getEdgeStatusHtml(edge) {
            if (!edge.enabled) {
                return html `<span class="statusBadge disabled">Disabled</span>`;
            }
            const status = this.getEdgeStatus(edge.id);
            if (status?.connected) {
                return html `<span class="statusBadge connected">Connected</span>`;
            }
            return html `<span class="statusBadge disconnected">Disconnected</span>`;
        }
        getEdgePublicIp(edgeId) {
            const status = this.getEdgeStatus(edgeId);
            return status?.publicIp || '-';
        }
        getPortsHtml(edge) {
            const manualPorts = edge.manualPorts || [];
            const derivedPorts = edge.derivedPorts || [];
            if (manualPorts.length === 0 && derivedPorts.length === 0) {
                return html `<span style="color: var(--text-muted, #6b7280); font-size: 12px;">none</span>`;
            }
            return html `<div class="portsDisplay">${manualPorts.map(p => html `<span class="portBadge manual">${p}</span>`)}${derivedPorts.map(p => html `<span class="portBadge derived">${p}</span>`)}${derivedPorts.length > 0 ? html `<span style="font-size: 11px; color: var(--text-muted, #6b7280); align-self: center;">(auto)</span>` : ''}</div>`;
        }
        getEdgeTunnelCount(edgeId) {
            const status = this.getEdgeStatus(edgeId);
            return status?.activeTunnels || 0;
        }
        getMaxConnectionsHtml(edge) {
            const status = this.getEdgeStatus(edge.id);
            const override = edge.performance?.maxStreamsPerEdge;
            const effective = status?.performance?.maxStreamsPerEdge;
            if (!override && !effective)
                return '-';
            return html `
      <div class="metricStack">
        <span>${override || effective}</span>
        <span class="metricMuted">${override ? 'edge override' : 'hub default'}</span>
      </div>
    `;
        }
        getTransportHtml(edgeId) {
            const status = this.getEdgeStatus(edgeId);
            if (!status?.connected)
                return '-';
            const mode = status.transportMode || 'unknown';
            const label = mode === 'quic' ? 'QUIC' : mode === 'tcpTls' ? 'TCP/TLS' : mode;
            return html `<div class="metricStack"><strong>${label}</strong><span class="metricMuted">${status.fallbackUsed ? 'fallback' : status.performance?.profile || 'default'}</span></div>`;
        }
        getWindowHtml(edgeId) {
            const status = this.getEdgeStatus(edgeId);
            if (!status?.connected || !status.flowControl)
                return '-';
            if (!status.flowControl.applies) {
                return html `<div class="metricStack"><span>native QUIC</span><span class="metricMuted">max ${status.performance?.maxStreamsPerEdge || '-'} streams</span></div>`;
            }
            return html `
      <div class="metricStack">
        <span>${this.formatBytes(status.flowControl.currentWindowBytes)} window</span>
        <span class="metricMuted">${this.formatBytes(status.flowControl.estimatedInFlightBytes)} est. in-flight</span>
      </div>
    `;
        }
        getQueuesHtml(edgeId) {
            const status = this.getEdgeStatus(edgeId);
            if (!status?.connected || !status.queues)
                return '-';
            return html `<div class="metricStack"><span>C ${status.queues.ctrlQueueDepth} / D ${status.queues.dataQueueDepth}</span><span class="metricMuted">S ${status.queues.sustainedQueueDepth}</span></div>`;
        }
        getTrafficHtml(edgeId) {
            const status = this.getEdgeStatus(edgeId);
            if (!status?.connected || !status.traffic)
                return '-';
            const drops = (status.traffic.rejectedStreams || 0) + (status.udp?.droppedDatagrams || 0);
            return html `
      <div class="metricStack">
        <span>${this.formatBytes(status.traffic.bytesIn)} in / ${this.formatBytes(status.traffic.bytesOut)} out</span>
        <span class="metricMuted">${drops} rejected/dropped</span>
      </div>
    `;
        }
        getLastHeartbeat(edgeId) {
            const status = this.getEdgeStatus(edgeId);
            if (!status?.lastHeartbeat)
                return '-';
            const ago = Date.now() - status.lastHeartbeat;
            if (ago < 60000)
                return `${Math.floor(ago / 1000)}s ago`;
            if (ago < 3600000)
                return `${Math.floor(ago / 60000)}m ago`;
            return `${Math.floor(ago / 3600000)}h ago`;
        }
        formatBytes(bytes) {
            if (!Number.isFinite(bytes) || bytes <= 0)
                return '0 B';
            const units = ['B', 'KB', 'MB', 'GB', 'TB'];
            let value = bytes;
            let unitIndex = 0;
            while (value >= 1024 && unitIndex < units.length - 1) {
                value = value / 1024;
                unitIndex++;
            }
            return `${value >= 10 || unitIndex === 0 ? value.toFixed(0) : value.toFixed(1)} ${units[unitIndex]}`;
        }
        collectPerformanceOverride(formData, base) {
            const next = { ...(base || {}) };
            const maxStreamsText = `${formData.maxStreamsPerEdge || ''}`.trim();
            if (maxStreamsText) {
                const maxStreamsPerEdge = Number.parseInt(maxStreamsText, 10);
                if (!Number.isInteger(maxStreamsPerEdge) || maxStreamsPerEdge < 1) {
                    throw new Error('Max Connections must be a positive integer');
                }
                next.maxStreamsPerEdge = maxStreamsPerEdge;
            }
            else {
                delete next.maxStreamsPerEdge;
            }
            if (Object.keys(next).length > 0) {
                return next;
            }
            return base ? {} : undefined;
        }
        static {
            __runInitializers(_classThis, _classExtraInitializers);
        }
    };
    return OpsViewRemoteIngress = _classThis;
})();
export { OpsViewRemoteIngress };
//# sourceMappingURL=data:application/json;base64, 