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 SzRegistryAdvertisement = (() => {
    let _classDecorators = [customElement('sz-registry-advertisement')];
    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 SzRegistryAdvertisement = 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);
            SzRegistryAdvertisement = _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-advertisement
        status="running"
        registryUrl="localhost:3000/v2"
      ></sz-registry-advertisement>
    </div>
  `;
        static demoGroups = ['Auth & Settings'];
        #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">
              Registry Advertisement
              <span class="default-badge">Default</span>
            </div>
            <div class="header-subtitle">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 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 registry -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 SzRegistryAdvertisement = _classThis;
})();
export { SzRegistryAdvertisement };
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3otcmVnaXN0cnktYWR2ZXJ0aXNlbWVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzX3dlYi9lbGVtZW50cy9zei1yZWdpc3RyeS1hZHZlcnRpc2VtZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQ0wsV0FBVyxFQUNYLGFBQWEsRUFDYixJQUFJLEVBQ0osR0FBRyxFQUNILFVBQVUsRUFDVixRQUFRLEdBRVQsTUFBTSw2QkFBNkIsQ0FBQztJQVN4Qix1QkFBdUI7NEJBRG5DLGFBQWEsQ0FBQywyQkFBMk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