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, customElement, html, css, cssManager, property, } from '@design.estate/dees-element';
let SzReverseProxyCard = (() => {
    let _classDecorators = [customElement('sz-reverse-proxy-card')];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = DeesElement;
    let _httpPort_decorators;
    let _httpPort_initializers = [];
    let _httpPort_extraInitializers = [];
    let _httpsPort_decorators;
    let _httpsPort_initializers = [];
    let _httpsPort_extraInitializers = [];
    let _httpActive_decorators;
    let _httpActive_initializers = [];
    let _httpActive_extraInitializers = [];
    let _httpsActive_decorators;
    let _httpsActive_initializers = [];
    let _httpsActive_extraInitializers = [];
    let _routeCount_decorators;
    let _routeCount_initializers = [];
    let _routeCount_extraInitializers = [];
    var SzReverseProxyCard = class extends _classSuper {
        static { _classThis = this; }
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            _httpPort_decorators = [property({ type: String })];
            _httpsPort_decorators = [property({ type: String })];
            _httpActive_decorators = [property({ type: Boolean })];
            _httpsActive_decorators = [property({ type: Boolean })];
            _routeCount_decorators = [property({ type: String })];
            __esDecorate(this, null, _httpPort_decorators, { kind: "accessor", name: "httpPort", static: false, private: false, access: { has: obj => "httpPort" in obj, get: obj => obj.httpPort, set: (obj, value) => { obj.httpPort = value; } }, metadata: _metadata }, _httpPort_initializers, _httpPort_extraInitializers);
            __esDecorate(this, null, _httpsPort_decorators, { kind: "accessor", name: "httpsPort", static: false, private: false, access: { has: obj => "httpsPort" in obj, get: obj => obj.httpsPort, set: (obj, value) => { obj.httpsPort = value; } }, metadata: _metadata }, _httpsPort_initializers, _httpsPort_extraInitializers);
            __esDecorate(this, null, _httpActive_decorators, { kind: "accessor", name: "httpActive", static: false, private: false, access: { has: obj => "httpActive" in obj, get: obj => obj.httpActive, set: (obj, value) => { obj.httpActive = value; } }, metadata: _metadata }, _httpActive_initializers, _httpActive_extraInitializers);
            __esDecorate(this, null, _httpsActive_decorators, { kind: "accessor", name: "httpsActive", static: false, private: false, access: { has: obj => "httpsActive" in obj, get: obj => obj.httpsActive, set: (obj, value) => { obj.httpsActive = value; } }, metadata: _metadata }, _httpsActive_initializers, _httpsActive_extraInitializers);
            __esDecorate(this, null, _routeCount_decorators, { kind: "accessor", name: "routeCount", static: false, private: false, access: { has: obj => "routeCount" in obj, get: obj => obj.routeCount, set: (obj, value) => { obj.routeCount = value; } }, metadata: _metadata }, _routeCount_initializers, _routeCount_extraInitializers);
            __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
            SzReverseProxyCard = _classThis = _classDescriptor.value;
            if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
        }
        static demo = () => html `
    <div style="padding: 24px; max-width: 400px;">
      <sz-reverse-proxy-card
        httpPort="8080"
        httpsPort="8443"
        httpActive
        httpsActive
        routeCount="3"
      ></sz-reverse-proxy-card>
    </div>
  `;
        static demoGroups = ['Network'];
        #httpPort_accessor_storage = __runInitializers(this, _httpPort_initializers, '80');
        get httpPort() { return this.#httpPort_accessor_storage; }
        set httpPort(value) { this.#httpPort_accessor_storage = value; }
        #httpsPort_accessor_storage = (__runInitializers(this, _httpPort_extraInitializers), __runInitializers(this, _httpsPort_initializers, '443'));
        get httpsPort() { return this.#httpsPort_accessor_storage; }
        set httpsPort(value) { this.#httpsPort_accessor_storage = value; }
        #httpActive_accessor_storage = (__runInitializers(this, _httpsPort_extraInitializers), __runInitializers(this, _httpActive_initializers, false));
        get httpActive() { return this.#httpActive_accessor_storage; }
        set httpActive(value) { this.#httpActive_accessor_storage = value; }
        #httpsActive_accessor_storage = (__runInitializers(this, _httpActive_extraInitializers), __runInitializers(this, _httpsActive_initializers, false));
        get httpsActive() { return this.#httpsActive_accessor_storage; }
        set httpsActive(value) { this.#httpsActive_accessor_storage = value; }
        #routeCount_accessor_storage = (__runInitializers(this, _httpsActive_extraInitializers), __runInitializers(this, _routeCount_initializers, '0'));
        get routeCount() { return this.#routeCount_accessor_storage; }
        set routeCount(value) { this.#routeCount_accessor_storage = value; }
        static styles = [
            cssManager.defaultStyles,
            css `
      :host {
        display: block;
        height: 100%;
      }

      .card {
        background: ${cssManager.bdTheme('#ffffff', '#09090b')};
        border: 1px solid ${cssManager.bdTheme('#e4e4e7', '#27272a')};
        border-radius: 8px;
        padding: 20px;
        height: 100%;
        box-sizing: border-box;
      }

      .header {
        margin-bottom: 16px;
      }

      .title {
        font-size: 16px;
        font-weight: 600;
        color: ${cssManager.bdTheme('#18181b', '#fafafa')};
      }

      .subtitle {
        font-size: 13px;
        color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
        margin-top: 2px;
      }

      .items {
        display: flex;
        flex-direction: column;
        gap: 10px;
      }

      .item {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .item-label {
        font-size: 14px;
        color: ${cssManager.bdTheme('#18181b', '#fafafa')};
      }

      .item-value {
        font-size: 14px;
        color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
      }

      .badge {
        display: inline-flex;
        align-items: center;
        padding: 2px 10px;
        border-radius: 9999px;
        font-size: 12px;
        font-weight: 500;
      }

      .badge.active {
        background: ${cssManager.bdTheme('#dcfce7', 'rgba(34, 197, 94, 0.2)')};
        color: ${cssManager.bdTheme('#16a34a', '#22c55e')};
      }

      .badge.inactive {
        background: ${cssManager.bdTheme('#fee2e2', 'rgba(239, 68, 68, 0.2)')};
        color: ${cssManager.bdTheme('#dc2626', '#ef4444')};
      }
    `,
        ];
        render() {
            return html `
      <div class="card">
        <div class="header">
          <div class="title">Reverse Proxy</div>
          <div class="subtitle">HTTP/HTTPS proxy status</div>
        </div>

        <div class="items">
          <div class="item">
            <span class="item-label">HTTP (${this.httpPort})</span>
            <span class="badge ${this.httpActive ? 'active' : 'inactive'}">
              ${this.httpActive ? 'Active' : 'Inactive'}
            </span>
          </div>
          <div class="item">
            <span class="item-label">HTTPS (${this.httpsPort})</span>
            <span class="badge ${this.httpsActive ? 'active' : 'inactive'}">
              ${this.httpsActive ? 'Active' : 'Inactive'}
            </span>
          </div>
          <div class="item">
            <span class="item-label">Routes</span>
            <span class="item-value">${this.routeCount}</span>
          </div>
        </div>
      </div>
    `;
        }
        constructor() {
            super(...arguments);
            __runInitializers(this, _routeCount_extraInitializers);
        }
        static {
            __runInitializers(_classThis, _classExtra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