onAnnotationClick?.(annotation.id)}
onkeydown={(e) => { if (e.key === 'Enter' || e.key === ' ') onAnnotationClick?.(annotation.id); }}
style="
position: absolute;
left: {annotation.x * 100}%;
top: {annotation.y * 100}%;
width: {annotation.width * 100}%;
height: {annotation.height * 100}%;
background-color: {hexToRgba(annotation.color, 0.3)};
pointer-events: auto;
{onAnnotationClick && !canAnnotate ? 'cursor: pointer;' : ''}
"
>
{#if canAnnotate}
{/if}
{#if (commentCounts?.[annotation.id] ?? 0) > 0}
{commentCounts?.[annotation.id]}
{/if}