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-stat-card.js';
let SzStatusGridCluster = (() => {
    let _classDecorators = [customElement('sz-status-grid-cluster')];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = DeesElement;
    let _stats_decorators;
    let _stats_initializers = [];
    let _stats_extraInitializers = [];
    var SzStatusGridCluster = class extends _classSuper {
        static { _classThis = this; }
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            _stats_decorators = [property({ type: Object })];
            __esDecorate(this, null, _stats_decorators, { kind: "accessor", name: "stats", static: false, private: false, access: { has: obj => "stats" in obj, get: obj => obj.stats, set: (obj, value) => { obj.stats = value; } }, metadata: _metadata }, _stats_initializers, _stats_extraInitializers);
            __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
            SzStatusGridCluster = _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: 900px;">
      <sz-status-grid-cluster
        .stats=${{
            totalServices: 7,
            running: 7,
            stopped: 0,
            dockerStatus: 'running',
        }}
      ></sz-status-grid-cluster>
    </div>
  `;
        #stats_accessor_storage = __runInitializers(this, _stats_initializers, {
            totalServices: 0,
            running: 0,
            stopped: 0,
            dockerStatus: 'stopped',
        });
        get stats() { return this.#stats_accessor_storage; }
        set stats(value) { this.#stats_accessor_storage = value; }
        static styles = [
            cssManager.defaultStyles,
            css `
      :host {
        display: block;
      }

      .grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        align-items: stretch;
      }

      .grid > * {
        height: 100%;
      }

      @media (min-width: 768px) {
        .grid {
          grid-template-columns: repeat(4, 1fr);
        }
      }
    `,
        ];
        render() {
            return html `
      <div class="grid">
        <sz-stat-card
          label="Total Services"
          value="${this.stats.totalServices}"
          icon="server"
        ></sz-stat-card>
        <sz-stat-card
          label="Running"
          value="${this.stats.running}"
          icon="check"
          variant="success"
        ></sz-stat-card>
        <sz-stat-card
          label="Stopped"
          value="${this.stats.stopped}"
          icon="stop"
          variant="${this.stats.stopped > 0 ? 'warning' : 'default'}"
        ></sz-stat-card>
        <sz-stat-card
          label="Docker"
          value="${this.stats.dockerStatus === 'running' ? 'Running' : 'Stopped'}"
          icon="container"
          variant="${this.stats.dockerStatus === 'running' ? 'success' : 'error'}"
          valueBadge
        ></sz-stat-card>
      </div>
    `;
        }
        constructor() {
            super(...arguments);
            __runInitializers(this, _stats_extraInitializers);
        }
        static {
            __runInitializers(_classThis, _classExtraInitializers);
        }
    };
    return SzStatusGridCluster = _classThis;
})();
export { SzStatusGridCluster };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3otc3RhdHVzLWdyaWQtY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX3dlYi9lbGVtZW50cy9zei1zdGF0dXMtZ3JpZC1jbHVzdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQ0wsV0FBVyxFQUNYLGFBQWEsRUFDYixJQUFJLEVBQ0osR0FBRyxFQUNILFVBQVUsRUFDVixRQUFRLEdBRVQsTUFBTSw2QkFBNkIsQ0FBQztBQUVyQyxPQUFPLG1CQUFtQixDQUFDO0lBZ0JkLG1CQUFtQjs0QkFEL0IsYUFBYSxDQUFDLHdCQUF3QixDQUFDOzs7O3NCQUNDLFdBQVc7Ozs7bUNBQW5CLFNBQVEsV0FBVzs7OztpQ0FjakQsUUFBUSxDQUFDLEVBQUUsSUFBSSxFQUFFLE1BQU0sRUFBRSxDQUFDO1lBQzNCLG9LQUFnQixLQUFLLDZCQUFMLEtBQUsscUZBS25CO1lBcEJKLDZLQThFQzs7OztRQTdFUSxNQUFNLENBQUMsSUFBSSxHQUFHLEdBQUcsRUFBRSxDQUFDLElBQUksQ0FBQTs7O2lCQUdoQjtZQUNQLGFBQWEsRUFBRSxDQUFDO1lBQ2hCLE9BQU8sRUFBRSxDQUFDO1lBQ1YsT0FBTyxFQ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