{#snippet avatar(name: string, size: "sm" | "md" = "md")} {@const hue = hueFromName(name || "?")} {/snippet} {#snippet commentBody(c: PublicComment)} {#if editingId === c.id}
{ e.preventDefault(); saveEdit(c.id); }} class="mt-2" >
{editBody.length} / {bodyMax}
{#if editError}

{editError}

{/if}
{:else}

{c.body}

{#if c.can_edit}
{/if} {/if} {/snippet} {#snippet meta(c: PublicComment)}
{c.author} {#if c.can_edit} {t(T.comments_self_marker)} {/if} {#if c.updated_at} {t(T.comments_edited)} {/if} {#if c.status === "pending"} {t(T.comments_pending_short)} {/if}
{/snippet}
{#if loading && comments.length === 0} {:else if loadError}

{t(T.comments_load_error_title)}

{loadError}

{:else} {#if topLevel.length === 0}

{t(T.comments_empty)}

{:else} {/if}

{t(T.comments_form_title)}

{#if submitError}

{submitError}

{/if}
{#if requireApproval} {t(T.comments_approval_hint)} {/if} {body.length} / {bodyMax}
{#if totalPending > 0}

{totalPending === 1 ? t(T.comments_pending_summary_one) : t(T.comments_pending_summary_other, { count: totalPending })}

{/if}
{/if}