{#each visibleItems as item (getItemKey(item))}
{#if item.type === 'header'}
{item.key}
{:else if item.type === 'artist'} {@const artistImage = artistImages.get(item.artist.name)} {@const displayName = item.artist.displayName || item.artist.name}
onArtistClick(item.artist.name)} onkeydown={(e) => e.key === 'Enter' && onArtistClick(item.artist.name)} >
{#if artistImage} {displayName} {:else} {/if}
{displayName}
{item.artist.album_count} albums • {item.artist.track_count} tracks
{/if}
{/each}