{#snippet commentActions(comment: CommentView, noun: "comment" | "reply")}
{#if currentUser} held.set(comment.uri, next)} dropdownOrigin="tr" dropdownAlign="right" triggerClass="hit-area-x-0.5 overflow-visible" /> {/if} {#if auth?.hasAccount(comment.authorDid)} (editingUri = comment.uri)}> Edit {noun} handleDelete(comment, noun)} > Delete {noun} {/if} navigator.clipboard.writeText(comment.uri)}> Copy AT URI {#if reporting.canReport(comment.authorDid)} {/if}
{/snippet} {#snippet commentEditor( comment: CommentView, replyUri: string | undefined, replyCid: string | undefined )} { editingUri = null; onedited?.(edited); }} oncancel={() => (editingUri = null)} /> {/snippet} {#snippet selfEditor()} {@render commentEditor(thread.self, undefined, undefined)} {/snippet} {#snippet selfActions()} {@render commentActions(thread.self, "comment")} {/snippet}
held.set(thread.self.uri, next)} editor={editingUri === thread.self.uri ? selfEditor : undefined} actions={thread.self.deleted ? undefined : selfActions} />
{#if thread.replies.length}
{#each thread.replies as reply, i (reply.uri)} {#snippet replyEditor()} {@render commentEditor(reply, thread.self.uri, thread.self.cid)} {/snippet} {#snippet replyActions()} {@render commentActions(reply, "reply")} {/snippet}
held.set(reply.uri, next)} editor={editingUri === reply.uri ? replyEditor : undefined} actions={replyActions} />
{/each}
{/if} {#if deleteSelected.error}
{/if} {#if (thread.self.deleted && !thread.self.cid) || selfGate.masked} {:else if currentUser}
{/if}