<div class="marketplaces-page">
  <header>
    <h1>Marketplaces</h1>
    <p>Registry, domains, and release/lifecycle status. Single-tenant derived until docs/backend/PHASE-9-TENANT-REGISTRY-DOMAINS-CONTRACT.md ships a real registry.</p>
  </header>

  @for (m of facade.marketplaces(); track m.id) {
    <section class="marketplaces-page__card">
      <h2>{{ m.name }} <app-badge variant="info">{{ m.lifecycleState }}</app-badge></h2>
      <p>Type: {{ m.type }} - Code: {{ m.code }}</p>
    </section>
  }

  <section>
    <h2>Domains &amp; Releases</h2>
    <ul>
      @for (d of facade.domains(); track d.domain) {
        <li>{{ d.domain }} - <app-badge [variant]="d.status === 'active' ? 'success' : 'neutral'">{{ d.status }}</app-badge> ({{ d.type }})</li>
      }
    </ul>
    @if (facade.lifecycle(); as lifecycle) {
      <p>Lifecycle: {{ lifecycle.currentState }} - blockers: {{ lifecycle.blockers.length === 0 ? 'none' : lifecycle.blockers.join(', ') }}</p>
    }
  </section>
</div>
