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 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>
  `;
        static demoGroups = ['Dashboard Grids'];
        #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;
      }
    `,
        ];
        get tiles() {
            return [
                {
                    id: 'total',
                    title: 'Total Services',
                    value: this.stats.totalServices,
                    type: 'number',
                    icon: 'lucide:server',
                },
                {
                    id: 'running',
                    title: 'Running',
                    value: this.stats.running,
                    type: 'number',
                    icon: 'lucide:check',
                    color: '#22c55e',
                },
                {
                    id: 'stopped',
                    title: 'Stopped',
                    value: this.stats.stopped,
                    type: 'number',
                    icon: 'lucide:circleStop',
                    color: this.stats.stopped > 0 ? '#f59e0b' : undefined,
                },
                {
                    id: 'docker',
                    title: 'Docker',
                    value: this.stats.dockerStatus === 'running' ? 'Running' : 'Stopped',
                    type: 'text',
                    icon: 'lucide:container',
                    color: this.stats.dockerStatus === 'running' ? '#22c55e' : '#ef4444',
                },
            ];
        }
        render() {
            return html `
      <dees-statsgrid
        .tiles=${this.tiles}
        .minTileWidth=${200}
      ></dees-statsgrid>
    `;
        }
        constructor() {
            super(...arguments);
            __runInitializers(this, _stats_extraInitializers);
        }
        static {
            __runInitializers(_classThis, _classExtraInitializers);
        }
    };
    return SzStatusGridCluster = _classThis;
})();
export { SzStatusGridCluster };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3otc3RhdHVzLWdyaWQtY2x1c3Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX3dlYi9lbGVtZW50cy9zei1zdGF0dXMtZ3JpZC1jbHVzdGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQ0wsV0FBVyxFQUNYLGFBQWEsRUFDYixJQUFJLEVBQ0osR0FBRyxFQUNILFVBQVUsRUFDVixRQUFRLEdBRVQsTUFBTSw2QkFBNkIsQ0FBQztJQWlCeEIsbUJBQW1COzRCQUQvQixhQUFhLENBQUMsd0JBQXdCLENBQUM7Ozs7c0JBQ0MsV0FBVzs7OzttQ0FBbkIsU0FBUSxXQUFXOzs7O2lDQWdCakQsUUFBUSxDQUFDLEVBQUUsSUFBSSxFQUFFLE1BQU0sRUFBRSxDQUFDO1lBQzNCLG9LQUFnQixLQUFLLDZCQUFMLEtBQUsscUZBS25CO1lBdEJKLDZLQTZFQzs7OztRQTVFUSxNQUFNLENBQUMsSUFBSSxHQUFHLEdBQUcsRUFBRSxDQUFDLElBQUksQ0FBQTs7O2lCQUdoQjtZQUNQLGFBQWEsRUFBRSxDQUFDO1lBQ2hCLE9BQU8sRUFBRSxDQUFDO1lBQ1YsT0FBTyxFQUFFLENBQUM7WUFDVixZQUFZLEVBQUUsU0FBUztTQU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