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 SzRegistryOneboxView = (() => {
    let _classDecorators = [customElement('sz-registry-onebox-view')];
    let _classDescriptor;
    let _classExtraInitializers = [];
    let _classThis;
    let _classSuper = DeesElement;
    let _status_decorators;
    let _status_initializers = [];
    let _status_extraInitializers = [];
    let _registryUrl_decorators;
    let _registryUrl_initializers = [];
    let _registryUrl_extraInitializers = [];
    var SzRegistryOneboxView = class extends _classSuper {
        static { _classThis = this; }
        static {
            const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
            _status_decorators = [property({ type: String })];
            _registryUrl_decorators = [property({ type: String })];
            __esDecorate(this, null, _status_decorators, { kind: "accessor", name: "status", static: false, private: false, access: { has: obj => "status" in obj, get: obj => obj.status, set: (obj, value) => { obj.status = value; } }, metadata: _metadata }, _status_initializers, _status_extraInitializers);
            __esDecorate(this, null, _registryUrl_decorators, { kind: "accessor", name: "registryUrl", static: false, private: false, access: { has: obj => "registryUrl" in obj, get: obj => obj.registryUrl, set: (obj, value) => { obj.registryUrl = value; } }, metadata: _metadata }, _registryUrl_initializers, _registryUrl_extraInitializers);
            __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
            SzRegistryOneboxView = _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: 800px;">
      <sz-registry-onebox-view
        status="running"
        registryUrl="localhost:3000/v2"
      ></sz-registry-onebox-view>
    </div>
  `;
        #status_accessor_storage = __runInitializers(this, _status_initializers, 'stopped');
        get status() { return this.#status_accessor_storage; }
        set status(value) { this.#status_accessor_storage = value; }
        #registryUrl_accessor_storage = (__runInitializers(this, _status_extraInitializers), __runInitializers(this, _registryUrl_initializers, ''));
        get registryUrl() { return this.#registryUrl_accessor_storage; }
        set registryUrl(value) { this.#registryUrl_accessor_storage = value; }
        static styles = [
            cssManager.defaultStyles,
            css `
      :host {
        display: block;
      }

      .card {
        background: ${cssManager.bdTheme('#ffffff', '#09090b')};
        border: 1px solid ${cssManager.bdTheme('#e4e4e7', '#27272a')};
        border-radius: 8px;
        overflow: hidden;
      }

      .card-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        border-bottom: 1px solid ${cssManager.bdTheme('#e4e4e7', '#27272a')};
      }

      .registry-icon {
        width: 40px;
        height: 40px;
        background: ${cssManager.bdTheme('#dbeafe', 'rgba(59, 130, 246, 0.2)')};
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: ${cssManager.bdTheme('#2563eb', '#60a5fa')};
      }

      .header-info {
        flex: 1;
      }

      .header-title {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 16px;
        font-weight: 600;
        color: ${cssManager.bdTheme('#18181b', '#fafafa')};
      }

      .default-badge {
        padding: 2px 8px;
        background: ${cssManager.bdTheme('#dbeafe', 'rgba(59, 130, 246, 0.2)')};
        color: ${cssManager.bdTheme('#2563eb', '#60a5fa')};
        border-radius: 4px;
        font-size: 11px;
        font-weight: 600;
      }

      .header-subtitle {
        font-size: 13px;
        color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
        margin-top: 2px;
      }

      .card-content {
        padding: 16px;
      }

      .info-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 16px;
        margin-bottom: 24px;
      }

      .info-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }

      .info-label {
        font-size: 12px;
        font-weight: 500;
        color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
        text-transform: uppercase;
        letter-spacing: 0.05em;
      }

      .info-value {
        font-size: 14px;
        color: ${cssManager.bdTheme('#18181b', '#fafafa')};
      }

      .status-badge {
        display: inline-flex;
        align-items: center;
        padding: 2px 8px;
        border-radius: 9999px;
        font-size: 12px;
        font-weight: 500;
      }

      .status-badge.running {
        background: ${cssManager.bdTheme('#dcfce7', 'rgba(34, 197, 94, 0.2)')};
        color: ${cssManager.bdTheme('#16a34a', '#22c55e')};
      }

      .status-badge.stopped {
        background: ${cssManager.bdTheme('#fee2e2', 'rgba(239, 68, 68, 0.2)')};
        color: ${cssManager.bdTheme('#dc2626', '#ef4444')};
      }

      .manage-link {
        color: ${cssManager.bdTheme('#2563eb', '#60a5fa')};
        text-decoration: none;
        cursor: pointer;
      }

      .manage-link:hover {
        text-decoration: underline;
      }

      .quick-start {
        background: ${cssManager.bdTheme('#f4f4f5', '#18181b')};
        border-radius: 6px;
        padding: 16px;
      }

      .quick-start-title {
        font-size: 14px;
        font-weight: 600;
        color: ${cssManager.bdTheme('#18181b', '#fafafa')};
        margin-bottom: 8px;
      }

      .quick-start-desc {
        font-size: 13px;
        color: ${cssManager.bdTheme('#71717a', '#a1a1aa')};
        margin-bottom: 12px;
      }

      .code-block {
        background: ${cssManager.bdTheme('#18181b', '#0a0a0a')};
        border-radius: 6px;
        padding: 12px;
        font-family: monospace;
        font-size: 13px;
        overflow-x: auto;
      }

      .code-line {
        color: ${cssManager.bdTheme('#a1a1aa', '#71717a')};
        margin-bottom: 4px;
      }

      .code-line:last-child {
        margin-bottom: 0;
      }

      .code-comment {
        color: ${cssManager.bdTheme('#6b7280', '#52525b')};
      }

      .code-command {
        color: ${cssManager.bdTheme('#fafafa', '#e4e4e7')};
      }
    `,
        ];
        render() {
            return html `
      <div class="card">
        <div class="card-header">
          <div class="registry-icon">
            <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
              <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path>
            </svg>
          </div>
          <div class="header-info">
            <div class="header-title">
              Onebox Registry (Built-in)
              <span class="default-badge">Default</span>
            </div>
            <div class="header-subtitle">Built-in container registry for your services</div>
          </div>
        </div>

        <div class="card-content">
          <div class="info-grid">
            <div class="info-item">
              <span class="info-label">Status</span>
              <span class="info-value">
                <span class="status-badge ${this.status}">${this.status === 'running' ? 'Running' : 'Stopped'}</span>
              </span>
            </div>
            <div class="info-item">
              <span class="info-label">Registry URL</span>
              <span class="info-value">${this.registryUrl}</span>
            </div>
            <div class="info-item">
              <span class="info-label">Authentication</span>
              <span class="info-value">
                <a class="manage-link" @click=${() => this.handleManageTokens()}>Manage Tokens</a>
              </span>
            </div>
          </div>

          <div class="quick-start">
            <div class="quick-start-title">Quick Start</div>
            <div class="quick-start-desc">To push images to the Onebox registry, use a CI or Global token:</div>
            <div class="code-block">
              <div class="code-line code-comment"># Login to the registry</div>
              <div class="code-line code-command">docker login ${this.registryUrl.split('/')[0]} -u onebox -p YOUR_TOKEN</div>
              <div class="code-line code-comment"># Tag and push your image</div>
              <div class="code-line code-command">docker tag myapp ${this.registryUrl.split('/')[0]}/myservice:latest</div>
              <div class="code-line code-command">docker push ${this.registryUrl.split('/')[0]}/myservice:latest</div>
            </div>
          </div>
        </div>
      </div>
    `;
        }
        handleManageTokens() {
            this.dispatchEvent(new CustomEvent('manage-tokens', { bubbles: true, composed: true }));
        }
        constructor() {
            super(...arguments);
            __runInitializers(this, _registryUrl_extraInitializers);
        }
        static {
            __runInitializers(_classThis, _classExtraInitializers);
        }
    };
    return SzRegistryOneboxView = _classThis;
})();
export { SzRegistryOneboxView };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3otcmVnaXN0cnktb25lYm94LXZpZXcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90c193ZWIvZWxlbWVudHMvc3otcmVnaXN0cnktb25lYm94LXZpZXcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLE9BQU8sRUFDTCxXQUFXLEVBQ1gsYUFBYSxFQUNiLElBQUksRUFDSixHQUFHLEVBQ0gsVUFBVSxFQUNWLFFBQVEsR0FFVCxNQUFNLDZCQUE2QixDQUFDO0lBU3hCLG9CQUFvQjs0QkFEaEMsYUFBYSxDQUFDLHlCQUF5QixDQUFDOzs7O3NCQUNDLFdBQVc7Oz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