{#if children}{@render children({ vote, score })}{:else}
castVote(vote == 1 ? 0 : 1)} class={[ 'flex items-center gap-0.5 transition-colors relative cursor-pointer', vote == 1 ? shouldShowVoteColor(vote, 'upvotes') : 'hover:bg-slate-100 dark:hover:bg-zinc-800', ]} aria-pressed={vote == 1} aria-label={$t('post.actions.vote.upvote')} >
{#if showCounts}
{#key upvotes}
{/key}
{/if}
{#if site.data?.site_view.local_site.enable_downvotes ?? true}
castVote(vote == -1 ? 0 : -1)} class={[ 'flex items-center flex-row-reverse gap-0.5 transition-colors cursor-pointer', vote == -1 ? shouldShowVoteColor(vote, 'downvotes') : 'hover:bg-slate-100 dark:hover:bg-zinc-800', ]} aria-pressed={vote == -1} aria-label={$t('post.actions.vote.downvote')} >
{#if showCounts}
{#key downvotes}
{/key}
{/if}
{/if}
{/if}