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: 45,
            memoryUsed: '4.96 GB',
            memoryTotal: '8 GB',
            networkIn: '1.2 MB/s',
            networkOut: '0.8 MB/s',
            topConsumers: [
                { name: 'api-service', memory: '512 MB' },
                { name: 'web-frontend', memory: '256 MB' },
                { name: 'worker', memory: '128 MB' },
            ],
        }}
        .platformServices=${[
            { name: 'MongoDB', status: '1 DB', running: true },
            { name: 'S3 Storage', status: '1 bucket', running: true },
            { name: 'ClickHouse', status: 'Stopped', running: false },
            { name: 'Redis Cache', status: 'Running', running: true },
        ]}
      ></sz-status-grid-services>
    </div>
  `;
        static demoGroups = ['Dashboard Grids'];
        #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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3otc3RhdHVzLWdyaWQtc2VydmljZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c193ZWIvZWxlbWVudHMvc3otc3RhdHVzLWdyaWQtc2VydmljZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLE9BQU8sRUFDTCxXQUFXLEVBQ1gsYUFBYSxFQUNiLElBQUksRUFDSixHQUFHLEVBQ0gsVUFBVSxFQUNWLFFBQVE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