{#if $reactions.length > 0 || (!hideZaps && $zaps.length > 0) || $reports.length > 0 || children}
{#if url && $reports.length > 0 && canBanEvent}
{$reports.length}
{/if} {#if !hideZaps} {#each groupedZaps.entries() as [key, zaps] (key)} {@const amount = fromMsats(sum(zaps.map(zap => zap.invoiceAmount)))} {@const pubkeys = uniq(zaps.map(zap => zap.request.pubkey))} {@const isOwn = pubkeys.includes($user.pubkey)} {@const info = displayList(pubkeys.map(pubkey => $displays.get(pubkey) ?? ""))} {@const tooltip = `${info} zapped`} {@const onZapClickHandler = () => onZapClick(pubkeys, tooltip)}
{amount}
{/each} {/if} {#each groupedReactions.entries() as [key, events] (key)} {@const pubkeys = events.map(e => e.pubkey)} {@const isOwn = pubkeys.includes($user.pubkey)} {@const info = displayList(pubkeys.map(pubkey => $displays.get(pubkey) ?? ""))} {@const tooltip = `${info} reacted`} {@const onClick = () => onReactionClick(events, pubkeys, info)}
{#if events.length > 1}
{events.length}
{/if}
{/each} {@render children?.()}
{/if}