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';
import './sz-resource-usage-card.js';
import './sz-platform-services-card.js';
let SzStatusGridServices = (() => {
    let _classDecorators = [customElement('sz-status-grid-services')];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = DeesElement;
    let _resourceUsage_decorators;
    let _resourceUsage_initializers = [];
    let _resourceUsage_extraInitializers = [];
    let _platformServices_decorators;
    let _platformServices_initializers = [];
    let _platformServices_extraInitializers = [];
    var SzStatusGridServices = class extends _classSuper {
        static { _classThis = this; }
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            _resourceUsage_decorators = [property({ type: Object })];
            _platformServices_decorators = [property({ type: Array })];
            __esDecorate(this, null, _resourceUsage_decorators, { kind: "accessor", name: "resourceUsage", static: false, private: false, access: { has: obj => "resourceUsage" in obj, get: obj => obj.resourceUsage, set: (obj, value) => { obj.resourceUsage = value; } }, metadata: _metadata }, _resourceUsage_initializers, _resourceUsage_extraInitializers);
            __esDecorate(this, null, _platformServices_decorators, { kind: "accessor", name: "platformServices", static: false, private: false, access: { has: obj => "platformServices" in obj, get: obj => obj.platformServices, set: (obj, value) => { obj.platformServices = value; } }, metadata: _metadata }, _platformServices_initializers, _platformServices_extraInitializers);
            __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
            SzStatusGridServices = _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: 1200px;">
      <sz-status-grid-services
        .resourceUsage=${{
            cpu: { percentage: 45, label: 'CPU Usage' },
            memory: { percentage: 62, label: 'Memory', used: '4.96 GB', total: '8 GB' },
            network: { percentage: 23, label: 'Network I/O', rate: '1.2 MB/s' },
            topConsumers: [
                { name: 'api-service', cpu: 25, memory: 512 },
                { name: 'web-frontend', cpu: 15, memory: 256 },
                { name: 'worker', cpu: 5, memory: 128 },
            ],
        }}
        .platformServices=${[
            { name: 'MongoDB', status: 'running' },
            { name: 'S3 Storage', status: 'running' },
            { name: 'ClickHouse', status: 'stopped' },
            { name: 'Redis Cache', status: 'running' },
        ]}
      ></sz-status-grid-services>
    </div>
  `;
        #resourceUsage_accessor_storage = __runInitializers(this, _resourceUsage_initializers, {
            cpu: 0,
            memoryUsed: '0 GB',
            memoryTotal: '0 GB',
            networkIn: '0 MB/s',
            networkOut: '0 MB/s',
            topConsumers: [],
        });
        get resourceUsage() { return this.#resourceUsage_accessor_storage; }
        set resourceUsage(value) { this.#resourceUsage_accessor_storage = value; }
        #platformServices_accessor_storage = (__runInitializers(this, _resourceUsage_extraInitializers), __runInitializers(this, _platformServices_initializers, []));
        get platformServices() { return this.#platformServices_accessor_storage; }
        set platformServices(value) { this.#platformServices_accessor_storage = value; }
        static styles = [
            cssManager.defaultStyles,
            css `
      :host {
        display: block;
      }

      .grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        align-items: stretch;
      }

      .grid > * {
        height: 100%;
      }

      @media (min-width: 768px) {
        .grid {
          grid-template-columns: 1fr 1fr;
        }
      }
    `,
        ];
        render() {
            return html `
      <div class="grid">
        <sz-resource-usage-card
          .usage=${this.resourceUsage}
        ></sz-resource-usage-card>
        <sz-platform-services-card
          .services=${this.platformServices}
        ></sz-platform-services-card>
      </div>
    `;
        }
        constructor() {
            super(...arguments);
            __runInitializers(this, _platformServices_extraInitializers);
        }
        static {
            __runInitializers(_classThis, _classExtraInitializers);
        }
    };
    return SzStatusGridServices = _classThis;
})();
export { SzStatusGridServices };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3otc3RhdHVzLWdyaWQtc2VydmljZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c193ZWIvZWxlbWVudHMvc3otc3RhdHVzLWdyaWQtc2VydmljZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLE9BQU8sRUFDTCxXQUFXLEVBQ1gsYUFBYSxFQUNiLElBQUksRUFDSixHQUFHLEVBQ0gsVUFBVSxFQUNWLFFBQVEs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