setReactions(thread.self.uri, next)}
editor={editingUri === thread.self.uri ? selfEditor : undefined}
/>
{#if editingUri !== thread.self.uri && !thread.self.deleted}
{@render commentActions(thread.self, "comment")}
{/if}
{#if thread.replies.length}
{#each thread.replies as reply, i (reply.uri)}
{#snippet replyEditor()}
{@render commentEditor(reply, thread.self.uri, thread.self.cid)}
{/snippet}
setReactions(reply.uri, next)}
editor={editingUri === reply.uri ? replyEditor : undefined}
/>
{#if editingUri !== reply.uri}
{@render commentActions(reply, "reply")}
{/if}
{/each}
{/if}
{#if deleteSelected.error}
{/if}
{#if thread.self.deleted && !thread.self.cid}
{:else if replying && currentUser}
{
replying = false;
onsubmitted?.(submitted);
}}
oncancel={() => (replying = false)}
/>
{:else}
{#if currentUser}
{:else}
Login to leave a reply
{/if}
{/if}