{#snippet methodRow(title: string, icon: string, state: PaymentMethodState, onAction: () => void)}
  • {title}

    {#if state.kind === "ok"}

    Connected

    {:else if state.kind === "error"}

    {state.message}

    {:else}

    Not set up

    {/if}
  • {/snippet}
    Your Spaces
    {#if loading}
    Loading your spaces…
    {:else if error}
    {error}
    {:else} {#if tenant} {/if} {#if relays.length === 0}

    You don't host any spaces yet.

    Create a space to get started.

    {:else}
    {#each relays as relay (relay.id)} {/each}
    {/if}
    Payment Methods {#if tenant} {status} {/if}
      {@render methodRow("Lightning (NWC)", Bolt, nwc, openNwcSetup)} {@render methodRow("Card", Card, card, openCardSetup)}
    Payment History {#if invoices.length === 0 && !draftInvoice}

    No invoices yet.

    {:else}
      {#if draftInvoice} {/if} {#each visibleInvoices as invoice (invoice.id)} openPayInvoice(invoice)} /> {/each} {#if invoices.length > INVOICE_PAGE_SIZE}
    • {/if}
    {/if}
    {/if}