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>
  `;
        #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, _classExtraInitializers);
        }
    };
    return S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