{#if loading && visible}
Loading highlights...
{/if} {#if visible && filteredHighlights.length > 0}
Highlights
{#each Array.from(groupedHighlights.entries()) as [pubkey, authorHighlights]} {@const isExpanded = expandedAuthors.has(pubkey)} {@const profile = authorProfiles.get(pubkey)} {@const displayName = getAuthorDisplayName(profile, pubkey)} {@const color = colorMap.get(pubkey) || "hsla(60, 70%, 60%, 0.5)"} {@const sortedHighlights = sortHighlightsByTime(authorHighlights)}
toggleAuthor(pubkey)} >
{displayName}
({authorHighlights.length})
{#if isExpanded}
{#each sortedHighlights as highlight} {@const truncated = useMockHighlights ? "test data" : truncateHighlight(highlight.content)} {@const showCopied = copyFeedback === highlight.id}
scrollToHighlight(highlight)} title={useMockHighlights ? "Mock highlight" : highlight.content} > {truncated}
copyHighlightNaddr(highlight)} title="Copy naddr" > {#if showCopied}
{:else}
{/if}
{/each}
{/if}
{/each}
{/if}