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 SzPlatformServicesCard = (() => {
    let _classDecorators = [customElement('sz-platform-services-card')];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = DeesElement;
    let _services_decorators;
    let _services_initializers = [];
    let _services_extraInitializers = [];
    var SzPlatformServicesCard = class extends _classSuper {
        static { _classThis = this; }
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            _services_decorators = [property({ type: Array })];
            __esDecorate(this, null, _services_decorators, { kind: "accessor", name: "services", static: false, private: false, access: { has: obj => "services" in obj, get: obj => obj.services, set: (obj, value) => { obj.services = value; } }, metadata: _metadata }, _services_initializers, _services_extraInitializers);
            __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
            SzPlatformServicesCard = _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: 500px;">
      <sz-platform-services-card
        .services=${[
            { name: 'MongoDB', status: '1 DB', running: true },
            { name: 'S3 Storage (MinIO)', status: '1 bucket', running: true },
            { name: 'Caddy Reverse Proxy', status: 'Running', running: true },
            { name: 'ClickHouse', status: '1 DB', running: true },
        ]}
      ></sz-platform-services-card>
    </div>
  `;
        static demoGroups = ['Platform'];
        #services_accessor_storage = __runInitializers(this, _services_initializers, []);
        get services() { return this.#services_accessor_storage; }
        set services(value) { this.#services_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;
      }

      .services-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .service-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        cursor: pointer;
        transition: opacity 200ms ease;
      }

      .service-item:hover {
        opacity: 0.8;
      }

      .service-left {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .status-dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        flex-shrink: 0;
      }

      .status-dot.running {
        background: ${cssManager.bdTheme('#22c55e', '#22c55e')};
        box-shadow: 0 0 6px ${cssManager.bdTheme('rgba(34, 197, 94, 0.4)', 'rgba(34, 197, 94, 0.4)')};
      }

      .status-dot.stopped {
        background: ${cssManager.bdTheme('#ef4444', '#ef4444')};
      }

      .service-name {
        font-size: 14px;
        font-weight: 500;
        color: ${cssManager.bdTheme('#18181b', '#fafafa')};
      }

      .service-status {
        font-size: 13px;
        color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
      }
    `,
        ];
        render() {
            return html `
      <div class="card">
        <div class="header">
          <div class="title">Platform Services</div>
          <div class="subtitle">Infrastructure status</div>
        </div>

        <div class="services-list">
          ${this.services.map((service) => html `
              <div class="service-item" @click=${() => this.handleServiceClick(service)}>
                <div class="service-left">
                  <div class="status-dot ${service.running ? 'running' : 'stopped'}"></div>
                  <span class="service-name">${service.name}</span>
                </div>
                <span class="service-status">${service.status}</span>
              </div>
            `)}
        </div>
      </div>
    `;
        }
        handleServiceClick(service) {
            this.dispatchEvent(new CustomEvent('service-click', {
                detail: service,
                bubbles: true,
                composed: true,
            }));
        }
        constructor() {
            super(...arguments);
            __runInitializers(this, _services_extraInitializers);
        }
        static {
            __runInitializers(_classThis, _classExtraInitializers);
        }
    };
    return SzPlatformServicesCard = _classThis;
})();
export { SzPlatformServicesCard };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3otcGxhdGZvcm0tc2VydmljZXMtY2FyZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX3dlYi9lbGVtZW50cy9zei1wbGF0Zm9ybS1zZXJ2aWNlcy1jYXJkLnRzIl0sIm5hbW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