# Comment Thread

> Threaded comments with one reply level, mention chips, badges for agents and clients, a review badge for pending comments and a sign-in prompt.

Source: https://docs.nasaqui.com/components/comment-thread

## Install

```bash
npx shadcn@latest add https://docs.nasaqui.com/r/comment-thread.json
```

A discussion under an issue, a document or a ticket. Every action awaits your callback, so a failed post keeps the text and shows the error.

## When to use

- Discussion on one record, with replies and @mentions.
- Comments from people, agents, clients and bots in one list.

## When not to use

- A live chat: use a chat component.
- A flat activity feed: use `Timeline`.

## Import

```tsx
import { CommentThread } from "@fadymondy/nasaq/web";
```

## Quick start

```tsx
<CommentThread
  comments={comments}
  currentUser={me}
  suggestions={people}
  onSubmit={async ({ body, mentions, parentId }) => save(body, mentions, parentId)}
  onEdit={async (id, body) => edit(id, body)}
  onDelete={async (id) => remove(id)}
/>
```

## Anatomy

```
CommentThread          data-slot="comment-thread"
├─ header              title and count
├─ thread              a root comment and its replies (one level)
│  ├─ author, badge    agent, client or bot, and "Awaiting review"
│  ├─ body             Markdown, mention chips
│  └─ actions          Reply, Edit, Delete, Approve (button menu and context menu)
└─ composer            MentionTextarea, or a sign-in prompt
```

## API

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `comments` | `ThreadComment[]` | required | Flat list in any order. `parentId` makes a reply. |
| `currentUser` | `CommentAuthor` | none | Their comments can be edited and deleted. |
| `signedIn` | `boolean` | `true` | False shows a sign-in prompt instead of the composer. |
| `suggestions` | `MentionOption[]` | `[]` | People offered by @. |
| `onSubmit` | `({ body, mentions, parentId? }) => Promise<...>` | none | Post or reply. Omit for a read-only thread. |
| `onEdit` / `onDelete` / `onApprove` | `(id, ...) => Promise<...>` | none | Omit to hide the action. |
| `canModerate` | `boolean` | `false` | Approve pending comments and edit or delete any comment. |
| `onSignIn` | `() => void` | none | The sign-in button. |
| `renderMention` | `(mention, chip) => ReactNode` | none | Wrap a chip, for example in a hover card. |
| `hideHeader` | `boolean` | `false` | Hide the title and count. |
| `labels` | `CommentThreadLabels` | en / ar | Every string. |

## Examples

- **Signed out**: `signedIn={false}` with `onSignIn`.
- **Moderation**: a comment with `pending: true` shows a badge; a moderator gets Approve.

## Accessibility

Each thread is a list; the composer is labelled; errors use `role="alert"`. Row actions open from a button menu or from a context-click, Shift+F10 or the Menu key.

## RTL & i18n

English and Arabic built in, `labels` overrides every string. Mixed-direction bodies use `dir="auto"`; times use the locale.

## Styling & tokens

Semantic tokens only. Reply indent uses logical padding.

## Do / Don't

- Do return `{ error }` from a callback instead of throwing.
- Do not nest replies deeper: a reply to a reply joins the same thread.

## Related

- [MentionTextarea](https://docs.nasaqui.com/components/mention-textarea)
- [IssueView](https://docs.nasaqui.com/components/issue-view)

## Lab

https://docs.nasaqui.com/?path=/docs/components-collaboration-comment-thread--docs

## Code

### React

```tsx
<CommentThread
  comments={comments}
  currentUser={me}
  suggestions={people}
  onSubmit={async ({ body, mentions, parentId }) => save(body, mentions, parentId)}
  onEdit={async (id, body) => edit(id, body)}
  onDelete={async (id) => remove(id)}
/>
```

### shadcn

```tsx
<CommentThread
  comments={comments}
  currentUser={me}
  suggestions={people}
  onSubmit={async ({ body, mentions, parentId }) => save(body, mentions, parentId)}
  onEdit={async (id, body) => edit(id, body)}
  onDelete={async (id) => remove(id)}
/>
```

### Vue

```vue
<script setup lang="ts">
import { NqCommentThread, type ThreadComment } from "@fadymondy/nasaq/vue";
import { ref } from "vue";

const me = { id: "u1", name: "Sara Ali" };
const people = [
  { id: "u1", name: "Sara Ali", description: "Design lead" },
  { id: "u2", name: "Omar Nasser", description: "Engineer" },
];
const comments = ref<ThreadComment[]>([
  { id: "c1", author: me, body: "Ready for review, @Omar Nasser.", createdAt: Date.now() - 3_600_000, mentions: [{ id: "u2", name: "Omar Nasser" }] },
  { id: "c2", author: { id: "u2", name: "Omar Nasser" }, body: "Looks good.", createdAt: Date.now() - 1_800_000, parentId: "c1" },
]);

async function save(input: { body: string; parentId?: string }) {
  comments.value.push({ id: `c${comments.value.length + 1}`, author: me, body: input.body, createdAt: Date.now(), parentId: input.parentId ?? null });
}
async function edit(id: string, body: string) {
  const c = comments.value.find((x) => x.id === id);
  if (c) Object.assign(c, { body, editedAt: Date.now() });
}
async function remove(id: string) {
  comments.value = comments.value.filter((x) => x.id !== id && x.parentId !== id);
}
</script>

<template>
  <NqCommentThread :comments="comments" :current-user="me" :suggestions="people" :on-submit="save" :on-edit="edit" :on-delete="remove" />
</template>
```

### Blade

```blade
@php
    $me = ['id' => 'u1', 'name' => 'Sara Ali'];
    $omar = ['id' => 'u2', 'name' => 'Omar Nasser', 'kind' => 'agent'];
    $comments = [
        ['id' => 'c1', 'author' => $me, 'body' => 'Can you check the **Q3 numbers**, @Omar Nasser?', 'createdAt' => '2026-09-29T09:01:00Z', 'mentions' => [['id' => 'u2', 'name' => 'Omar Nasser']]],
        ['id' => 'c2', 'author' => $omar, 'body' => 'On it. Totals look right.', 'createdAt' => '2026-09-29T09:05:00Z', 'parentId' => 'c1', 'editedAt' => '2026-09-29T09:07:00Z'],
        ['id' => 'c3', 'author' => $omar, 'body' => 'Pricing note waiting for review.', 'createdAt' => '2026-09-29T09:09:00Z', 'pending' => true],
    ];
    $people = [['id' => 'u2', 'name' => 'Omar Nasser'], ['id' => 'u3', 'name' => 'Lina Haddad']];
@endphp
<div class="w-full max-w-xl">
    <x-nq::comment-thread :comments="$comments" :current-user="$me" :suggestions="$people" post edit delete />
</div>
```

### HTML + Alpine

```html
<div class="w-full max-w-xl">
    <section data-slot="comment-thread" aria-label="Comment thread" x-data="nqCommentThread(JSON.parse('{\u0022bodies\u0022:{\u0022c1\u0022:\u0022Can you check the **Q3 numbers**, @Omar Nasser?\u0022,\u0022c2\u0022:\u0022On it. Totals look right.\u0022,\u0022c3\u0022:\u0022Pricing note waiting for review.\u0022},\u0022labels\u0022:{\u0022failed\u0022:\u0022That did not work. Try again.\u0022}}'))" class="flex min-w-0 flex-col gap-4">
            <h3 class="flex items-center gap-2 text-label text-foreground">
            <svg aria-hidden="true" class="size-4 text-muted-foreground" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z"/>
</svg>            Comments
            <span data-slot="badge"     class="inline-flex h-5 shrink-0 items-center gap-1 whitespace-nowrap rounded-[4px] border px-1.5 text-caption font-medium [&_svg]:size-3 border-border text-muted-foreground"><bdi data-slot="num" data-numeric="" class="tabular-nums">3</bdi></span>
        </h3>
                <ol class="m-0 flex list-none flex-col gap-5 p-0">
                                            <li class="flex min-w-0 flex-col gap-3">
                    <div data-slot="context-menu" x-data="nqContextMenu(false)" x-modelable="open" class="contents"><div data-slot="comment" x-bind="trigger" x-ref="trigger" class="-m-2 flex min-w-0 gap-3 rounded-card p-2" role="article" aria-label="Sara Ali"><span data-slot="avatar" x-data="nqAvatar(0)"
    class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-8 text-caption rounded-full mt-0.5">
                    <span data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-bind="fallback"
             role="img" aria-label="Sara Ali" >SA</span>
    </span>
        <div class="flex min-w-0 flex-1 flex-col gap-1">
            <header class="flex flex-wrap items-center gap-x-2 gap-y-1">
                <span class="text-label text-foreground">Sara Ali</span>
                                                <time data-slot="date-time" datetime="2026-09-29T09:01:00+00:00" dir="auto"  title="Sep 29, 2026"     class="tabular-nums [unicode-bidi:isolate] text-caption text-muted-foreground">1 minute from now</time>
                                                    <span class="ms-auto">
                        <div data-slot="dropdown-menu" x-data="nqDropdownMenu(false)" x-modelable="open" class="contents"><button data-slot="dropdown-menu-trigger"
     type="button"                         x-bind="trigger" x-ref="trigger" aria-label="Actions for the comment by Sara Ali" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-foreground hover:bg-nq-hover size-control-sm p-0">
        <svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <circle cx="12" cy="12" r="1"/>
  <circle cx="19" cy="12" r="1"/>
  <circle cx="5" cy="12" r="1"/>
</svg></button>
                            <template x-teleport="body">
    <div data-slot="dropdown-menu-content" x-bind="popup" x-init="popupEl = $el" x-nq-presence="open" x-anchor.bottom-end.offset.4="$refs.trigger"
        class="z-50 overflow-hidden rounded-floating border border-border bg-popover p-1.5 text-popover-foreground shadow-floating outline-none max-h-[var(--available-height)] overflow-y-auto transition-opacity duration-150 ease-nq data-starting-style:opacity-0 data-ending-style:opacity-0 min-w-44"><div data-slot="dropdown-menu-item" role="menuitem" data-variant="default" x-bind="item"
        data-action="edit" x-on:click="startEdit(&#039;c1&#039;)" class="relative flex h-nav-row min-h-[var(--nq-touch-min,0px)] cursor-default select-none items-center gap-2.5 rounded-control px-2.5 text-body-sm text-foreground outline-none data-highlighted:bg-nq-selected data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/>
  <path d="m15 5 4 4"/>
</svg>Edit</div>
                                                                <div data-slot="dropdown-menu-separator" role="separator" aria-orientation="horizontal" class="-mx-1.5 my-1.5 h-px bg-border"></div>
                                                                    <div data-slot="dropdown-menu-item" role="menuitem" data-variant="danger" x-bind="item"
        data-action="delete" x-on:click="askDelete(&#039;c1&#039;)" class="relative flex h-nav-row min-h-[var(--nq-touch-min,0px)] cursor-default select-none items-center gap-2.5 rounded-control px-2.5 text-body-sm outline-none data-highlighted:bg-nq-selected data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 text-nq-danger-text [&_svg]:text-current"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M10 11v6"/>
  <path d="M14 11v6"/>
  <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/>
  <path d="M3 6h18"/>
  <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
</svg>Delete</div></div>
</template></div>
                    </span>
                            </header>
                            <div x-show="editId === 'c1'" x-cloak>
                    <form data-slot="comment-composer" data-composer="edit"  data-for="c1"  novalidate
    x-on:submit.prevent="submit('edit', 'c1')"
    x-on:keydown="key($event, 'edit', 'c1')"
    x-on:nq-mentions-change="mentions.edit = $event.detail.mentions"
    class="flex min-w-0 gap-3">
        <div class="flex min-w-0 flex-1 flex-col gap-2">
        <div data-slot="mention-textarea" x-data="nqMentionTextarea('', JSON.parse('{\u0022suggestions\u0022:[{\u0022id\u0022:\u0022u2\u0022,\u0022name\u0022:\u0022Omar Nasser\u0022},{\u0022id\u0022:\u0022u3\u0022,\u0022name\u0022:\u0022Lina Haddad\u0022}],\u0022strings\u0022:{\u0022list\u0022:\u0022Mentions\u0022,\u0022empty\u0022:\u0022No matches\u0022,\u0022count\u0022:\u0022{n} suggestions\u0022,\u0022person\u0022:\u0022People\u0022,\u0022team\u0022:\u0022Teams\u0022,\u0022group\u0022:\u0022Groups\u0022,\u0022teamOne\u0022:\u0022Team\u0022,\u0022groupOne\u0022:\u0022Group\u0022}}'))" x-modelable="text" x-id="['nq-mention']"
    x-model="drafts.edit" class="relative w-full">
    <textarea data-slot="textarea"
                x-bind="area" x-ref="area" rows="2" placeholder="Write a comment…" aria-label="Write a comment…" x-bind:disabled="busy !== &#039;&#039;" class="w-full min-w-0 rounded-control border border-input bg-card px-3 text-body text-foreground transition-colors duration-150 ease-nq outline-none placeholder:text-muted-foreground focus-visible:border-nq-focus focus-visible:outline-1 focus-visible:outline-nq-focus data-invalid:border-nq-danger aria-invalid:border-nq-danger disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:text-[16px] min-h-20 py-2"></textarea>
    <ul x-show="open()" x-cloak :id="listId()" role="listbox" aria-label="Mentions" data-slot="mention-list" :style="listStyle()" @mousedown.prevent
        class="absolute z-50 max-h-56 w-64 max-w-full overflow-y-auto rounded-floating border border-border bg-popover p-1 text-body-sm text-popover-foreground shadow-floating">
        <template x-for="r in rows()" :key="r.key">
            <li x-bind="row(r)">
                <span x-show="r.type === 'heading'" x-text="r.type === 'heading' ? heading(r.kind) : ''"></span>
                <span x-show="r.type === 'option' && (r.option.kind ?? 'person') === 'person'" class="relative inline-flex shrink-0">
                    <span data-slot="avatar" aria-hidden="true" class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-6 text-[10px] rounded-full">
                        <img x-show="r.type === 'option' && r.option.avatar" data-slot="avatar-image" :src="r.type === 'option' ? r.option.avatar : null" alt="" class="size-full object-cover" style="display: none">
                        <span x-show="r.type === 'option' && ! r.option.avatar" data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-text="r.type === 'option' ? initials(r.option.name) : ''"></span>
                    </span>
                    <span x-show="r.type === 'option' && r.option.presence" style="display: none" data-slot="presence-dot" aria-hidden="true"
                        :data-presence="r.type === 'option' ? r.option.presence : null"
                        :class="r.type === 'option' && r.option.presence ? presenceClass(r.option.presence) : ''"
                        class="absolute -end-0.5 -bottom-0.5 inline-block size-2.5 shrink-0 rounded-full border-2 border-popover"></span>
                </span>
                <span x-show="r.type === 'option' && (r.option.kind ?? 'person') !== 'person'" style="display: none" aria-hidden="true" class="inline-flex size-6 shrink-0 items-center justify-center rounded-control bg-secondary text-secondary-foreground">
                    <span class="flex [&_svg]:size-3.5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/>
  <path d="M16 3.128a4 4 0 0 1 0 7.744"/>
  <path d="M22 21v-2a4 4 0 0 0-3-3.87"/>
  <circle cx="9" cy="7" r="4"/>
</svg></span>
                </span>
                <span x-show="r.type === 'option'" class="flex min-w-0 flex-col">
                    <span class="truncate text-label text-foreground">
                        <span x-text="r.type === 'option' ? r.option.name : ''"></span>
                        <span x-show="r.type === 'option' && (r.option.kind ?? 'person') !== 'person'" style="display: none" class="sr-only" x-text="r.type === 'option' ? ' (' + kindLabel(r.option.kind) + ')' : ''"></span>
                    </span>
                    <span x-show="r.type === 'option' && r.option.description" style="display: none" class="truncate text-caption text-muted-foreground" x-text="r.type === 'option' ? r.option.description : ''"></span>
                </span>
            </li>
        </template>
    </ul>
    <div x-show="emptyShown()" x-cloak data-slot="mention-empty" :style="listStyle()"
        class="absolute z-50 w-64 max-w-full rounded-floating border border-border bg-popover px-3 py-2 text-body-sm text-muted-foreground shadow-floating">No matches</div>
    <span role="status" class="sr-only" x-text="status()"></span>
    </div>
        <p x-show="err.edit" x-cloak x-text="err.edit" role="alert" class="text-body-sm text-nq-danger-text"></p>
        <div class="flex items-center justify-end gap-2">
                            <button data-slot="button"
     type="button"                         x-on:click="cancelEdit()" x-bind:disabled="busy !== &#039;&#039;" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-foreground hover:bg-nq-hover h-control-sm px-2.5">
        Cancel</button>
                        <button data-slot="button"
     type="submit"                         x-bind:disabled="empty(&#039;edit&#039;) || busy !== &#039;&#039;" x-bind:aria-busy="busy === &#039;edit&#039;" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:bg-[color-mix(in_oklab,var(--nq-action)_88%,var(--nq-fg))] h-control-sm px-2.5">
        <svg data-slot="spinner" aria-hidden="true" x-show="busy === &#039;edit&#039;" x-cloak="1" class="animate-spin motion-reduce:animate-none size-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M21 12a9 9 0 1 1-6.219-8.56"/>
</svg>                Save</button>
        </div>
    </div>
</form>
                </div>
                        <div data-slot="comment-body"  x-show="editId !== 'c1'"  x-on:click="mentionClick($event)" class="[&amp;_a[href^=&#039;#mention-&#039;]]:cursor-default [&amp;_a[href^=&#039;#mention-&#039;]]:rounded-[4px] [&amp;_a[href^=&#039;#mention-&#039;]]:bg-nq-info-soft [&amp;_a[href^=&#039;#mention-&#039;]]:px-1 [&amp;_a[href^=&#039;#mention-&#039;]]:font-medium [&amp;_a[href^=&#039;#mention-&#039;]]:text-nq-info-text [&amp;_a[href^=&#039;#mention-&#039;]]:no-underline"><div data-slot="markdown" class="flex min-w-0 flex-col text-nq-fg-body gap-2 text-body-sm"><p data-slot="text" dir="auto" class="text-body text-nq-fg-body text-start">Can you check the <strong class="font-semibold text-foreground">Q3 numbers</strong>, <a data-slot="comment-mention" href="#mention-u2" class="rounded-[2px] text-foreground underline decoration-nq-line-strong underline-offset-4 outline-none hover:decoration-current focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus">@Omar Nasser</a>?</p>
</div>
</div>
                                        <p x-show="err['c:' + 'c1']" x-cloak x-text="err['c:' + 'c1']" role="alert" class="text-body-sm text-nq-danger-text"></p>
                                        <div x-show="confirmId === 'c1'" x-cloak role="alertdialog" aria-label="Delete this comment?" class="flex flex-wrap items-center gap-2 text-body-sm">
                    <span class="text-foreground">Delete this comment?</span>
                    <button data-slot="button"
     type="button"                         data-action="confirm-delete" x-on:click="remove(&#039;c1&#039;)" x-bind:disabled="busy !== &#039;&#039;" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-destructive text-destructive-foreground hover:bg-[color-mix(in_oklab,var(--nq-danger-solid)_88%,var(--nq-fg))] h-control-sm px-2.5">
        Delete</button>
                    <button data-slot="button"
     type="button"                         x-on:click="cancelDelete()" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-foreground hover:bg-nq-hover h-control-sm px-2.5">
        Cancel</button>
                </div>
                                        <div  x-show="editId !== 'c1'" >
                    <button data-slot="button"
     type="button"                         data-action="reply" x-on:click="startReply(&#039;c1&#039;)" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-nq-hover h-control-sm px-2.5 -ms-2 text-muted-foreground">
        <svg aria-hidden="true" class="rtl:-scale-x-100" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="m15 10 5 5-5 5"/>
  <path d="M4 4v7a4 4 0 0 0 4 4h12"/>
</svg>                        Reply</button>
                </div>
                    </div></div>
            <template x-teleport="body">
    <div data-slot="context-menu-content" x-bind="popup" x-init="popupEl = $el" x-nq-presence="open"
        class="fixed z-50 overflow-hidden rounded-floating border border-border bg-popover p-1.5 text-popover-foreground shadow-floating outline-none max-h-[var(--available-height)] overflow-y-auto transition-opacity duration-150 ease-nq data-starting-style:opacity-0 data-ending-style:opacity-0 min-w-44"><div data-slot="context-menu-item" role="menuitem" data-variant="default" x-bind="item"
        data-action="reply" x-on:click="startReply(&#039;c1&#039;)" class="relative flex h-nav-row min-h-[var(--nq-touch-min,0px)] cursor-default select-none items-center gap-2.5 rounded-control px-2.5 text-body-sm text-foreground outline-none data-highlighted:bg-nq-selected data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="m15 10 5 5-5 5"/>
  <path d="M4 4v7a4 4 0 0 0 4 4h12"/>
</svg>Reply</div>
                        <div data-slot="context-menu-separator" role="separator" aria-orientation="horizontal" class="-mx-1.5 my-1.5 h-px bg-border"></div>
                                                    <div data-slot="context-menu-item" role="menuitem" data-variant="default" x-bind="item"
        data-action="edit" x-on:click="startEdit(&#039;c1&#039;)" class="relative flex h-nav-row min-h-[var(--nq-touch-min,0px)] cursor-default select-none items-center gap-2.5 rounded-control px-2.5 text-body-sm text-foreground outline-none data-highlighted:bg-nq-selected data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"/>
  <path d="m15 5 4 4"/>
</svg>Edit</div>
                        <div data-slot="context-menu-separator" role="separator" aria-orientation="horizontal" class="-mx-1.5 my-1.5 h-px bg-border"></div>
                            <div data-slot="context-menu-item" role="menuitem" data-variant="danger" x-bind="item"
        data-action="delete" x-on:click="askDelete(&#039;c1&#039;)" class="relative flex h-nav-row min-h-[var(--nq-touch-min,0px)] cursor-default select-none items-center gap-2.5 rounded-control px-2.5 text-body-sm outline-none data-highlighted:bg-nq-selected data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 text-nq-danger-text [&_svg]:text-current"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M10 11v6"/>
  <path d="M14 11v6"/>
  <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/>
  <path d="M3 6h18"/>
  <path d="M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/>
</svg>Delete</div></div>
</template></div>
                    <ol  aria-label="1 replies"                         class="m-0 ms-4 flex list-none flex-col gap-3 border-s border-border p-0 ps-4">
                                                    <li>
                                <div data-slot="context-menu" x-data="nqContextMenu(false)" x-modelable="open" class="contents"><div data-slot="comment" x-bind="trigger" x-ref="trigger" class="-m-2 flex min-w-0 gap-3 rounded-card p-2" role="article" aria-label="Omar Nasser"><span data-slot="avatar" x-data="nqAvatar(0)"
    class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-6 text-[10px] rounded-full mt-0.5">
                    <span data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-bind="fallback"
             role="img" aria-label="Omar Nasser" >ON</span>
    </span>
        <div class="flex min-w-0 flex-1 flex-col gap-1">
            <header class="flex flex-wrap items-center gap-x-2 gap-y-1">
                <span class="text-label text-foreground">Omar Nasser</span>
                                    <span data-slot="badge"     class="inline-flex h-5 shrink-0 items-center gap-1 whitespace-nowrap rounded-[4px] border px-1.5 text-caption font-medium [&_svg]:size-3 border-nq-accent/40 bg-nq-accent/15 text-nq-accent-text"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M12 8V4H8"/>
  <rect width="16" height="12" x="4" y="8" rx="2"/>
  <path d="M2 14h2"/>
  <path d="M20 14h2"/>
  <path d="M15 13v2"/>
  <path d="M9 13v2"/>
</svg>                        Agent</span>
                                                <time data-slot="date-time" datetime="2026-09-29T09:05:00+00:00" dir="auto"  title="Sep 29, 2026"     class="tabular-nums [unicode-bidi:isolate] text-caption text-muted-foreground">5 minutes from now</time>
                <span class="text-caption text-muted-foreground">(edited)</span>                            </header>
                        <div data-slot="comment-body"  x-on:click="mentionClick($event)" class="[&amp;_a[href^=&#039;#mention-&#039;]]:cursor-default [&amp;_a[href^=&#039;#mention-&#039;]]:rounded-[4px] [&amp;_a[href^=&#039;#mention-&#039;]]:bg-nq-info-soft [&amp;_a[href^=&#039;#mention-&#039;]]:px-1 [&amp;_a[href^=&#039;#mention-&#039;]]:font-medium [&amp;_a[href^=&#039;#mention-&#039;]]:text-nq-info-text [&amp;_a[href^=&#039;#mention-&#039;]]:no-underline"><div data-slot="markdown" class="flex min-w-0 flex-col text-nq-fg-body gap-2 text-body-sm"><p data-slot="text" dir="auto" class="text-body text-nq-fg-body text-start">On it. Totals look right.</p>
</div>
</div>
                                                        </div></div></div>
                            </li>
                                                                            <li x-show="replyTo === 'c1'" x-cloak>
                                <form data-slot="comment-composer" data-composer="reply"  data-for="c1"  novalidate
    x-on:submit.prevent="submit('reply', 'c1')"
    x-on:keydown="key($event, 'reply', 'c1')"
    x-on:nq-mentions-change="mentions.reply = $event.detail.mentions"
    class="flex min-w-0 gap-3">
            <span data-slot="avatar" x-data="nqAvatar(0)"
    class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-8 text-caption rounded-full mt-0.5">
                    <span data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-bind="fallback"
             role="img" aria-label="Sara Ali" >SA</span>
    </span>
        <div class="flex min-w-0 flex-1 flex-col gap-2">
        <div data-slot="mention-textarea" x-data="nqMentionTextarea('', JSON.parse('{\u0022suggestions\u0022:[{\u0022id\u0022:\u0022u2\u0022,\u0022name\u0022:\u0022Omar Nasser\u0022},{\u0022id\u0022:\u0022u3\u0022,\u0022name\u0022:\u0022Lina Haddad\u0022}],\u0022strings\u0022:{\u0022list\u0022:\u0022Mentions\u0022,\u0022empty\u0022:\u0022No matches\u0022,\u0022count\u0022:\u0022{n} suggestions\u0022,\u0022person\u0022:\u0022People\u0022,\u0022team\u0022:\u0022Teams\u0022,\u0022group\u0022:\u0022Groups\u0022,\u0022teamOne\u0022:\u0022Team\u0022,\u0022groupOne\u0022:\u0022Group\u0022}}'))" x-modelable="text" x-id="['nq-mention']"
    x-model="drafts.reply" class="relative w-full">
    <textarea data-slot="textarea"
                x-bind="area" x-ref="area" rows="2" placeholder="Write a reply…" aria-label="Write a reply…" x-bind:disabled="busy !== &#039;&#039;" class="w-full min-w-0 rounded-control border border-input bg-card px-3 text-body text-foreground transition-colors duration-150 ease-nq outline-none placeholder:text-muted-foreground focus-visible:border-nq-focus focus-visible:outline-1 focus-visible:outline-nq-focus data-invalid:border-nq-danger aria-invalid:border-nq-danger disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:text-[16px] min-h-20 py-2"></textarea>
    <ul x-show="open()" x-cloak :id="listId()" role="listbox" aria-label="Mentions" data-slot="mention-list" :style="listStyle()" @mousedown.prevent
        class="absolute z-50 max-h-56 w-64 max-w-full overflow-y-auto rounded-floating border border-border bg-popover p-1 text-body-sm text-popover-foreground shadow-floating">
        <template x-for="r in rows()" :key="r.key">
            <li x-bind="row(r)">
                <span x-show="r.type === 'heading'" x-text="r.type === 'heading' ? heading(r.kind) : ''"></span>
                <span x-show="r.type === 'option' && (r.option.kind ?? 'person') === 'person'" class="relative inline-flex shrink-0">
                    <span data-slot="avatar" aria-hidden="true" class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-6 text-[10px] rounded-full">
                        <img x-show="r.type === 'option' && r.option.avatar" data-slot="avatar-image" :src="r.type === 'option' ? r.option.avatar : null" alt="" class="size-full object-cover" style="display: none">
                        <span x-show="r.type === 'option' && ! r.option.avatar" data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-text="r.type === 'option' ? initials(r.option.name) : ''"></span>
                    </span>
                    <span x-show="r.type === 'option' && r.option.presence" style="display: none" data-slot="presence-dot" aria-hidden="true"
                        :data-presence="r.type === 'option' ? r.option.presence : null"
                        :class="r.type === 'option' && r.option.presence ? presenceClass(r.option.presence) : ''"
                        class="absolute -end-0.5 -bottom-0.5 inline-block size-2.5 shrink-0 rounded-full border-2 border-popover"></span>
                </span>
                <span x-show="r.type === 'option' && (r.option.kind ?? 'person') !== 'person'" style="display: none" aria-hidden="true" class="inline-flex size-6 shrink-0 items-center justify-center rounded-control bg-secondary text-secondary-foreground">
                    <span class="flex [&_svg]:size-3.5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/>
  <path d="M16 3.128a4 4 0 0 1 0 7.744"/>
  <path d="M22 21v-2a4 4 0 0 0-3-3.87"/>
  <circle cx="9" cy="7" r="4"/>
</svg></span>
                </span>
                <span x-show="r.type === 'option'" class="flex min-w-0 flex-col">
                    <span class="truncate text-label text-foreground">
                        <span x-text="r.type === 'option' ? r.option.name : ''"></span>
                        <span x-show="r.type === 'option' && (r.option.kind ?? 'person') !== 'person'" style="display: none" class="sr-only" x-text="r.type === 'option' ? ' (' + kindLabel(r.option.kind) + ')' : ''"></span>
                    </span>
                    <span x-show="r.type === 'option' && r.option.description" style="display: none" class="truncate text-caption text-muted-foreground" x-text="r.type === 'option' ? r.option.description : ''"></span>
                </span>
            </li>
        </template>
    </ul>
    <div x-show="emptyShown()" x-cloak data-slot="mention-empty" :style="listStyle()"
        class="absolute z-50 w-64 max-w-full rounded-floating border border-border bg-popover px-3 py-2 text-body-sm text-muted-foreground shadow-floating">No matches</div>
    <span role="status" class="sr-only" x-text="status()"></span>
    </div>
        <p x-show="err.reply" x-cloak x-text="err.reply" role="alert" class="text-body-sm text-nq-danger-text"></p>
        <div class="flex items-center justify-end gap-2">
                            <button data-slot="button"
     type="button"                         x-on:click="cancelReply()" x-bind:disabled="busy !== &#039;&#039;" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-foreground hover:bg-nq-hover h-control-sm px-2.5">
        Cancel</button>
                        <button data-slot="button"
     type="submit"                         x-bind:disabled="empty(&#039;reply&#039;) || busy !== &#039;&#039;" x-bind:aria-busy="busy === &#039;reply&#039;" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:bg-[color-mix(in_oklab,var(--nq-action)_88%,var(--nq-fg))] h-control-sm px-2.5">
        <svg data-slot="spinner" aria-hidden="true" x-show="busy === &#039;reply&#039;" x-cloak="1" class="animate-spin motion-reduce:animate-none size-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M21 12a9 9 0 1 1-6.219-8.56"/>
</svg>                Reply</button>
        </div>
    </div>
</form>
                            </li>
                                            </ol>
                </li>
                                            <li class="flex min-w-0 flex-col gap-3">
                    <div data-slot="context-menu" x-data="nqContextMenu(false)" x-modelable="open" class="contents"><div data-slot="comment" x-bind="trigger" x-ref="trigger" class="-m-2 flex min-w-0 gap-3 rounded-card p-2 bg-nq-warning-soft/40" role="article" aria-label="Omar Nasser" data-pending=""><span data-slot="avatar" x-data="nqAvatar(0)"
    class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-8 text-caption rounded-full mt-0.5">
                    <span data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-bind="fallback"
             role="img" aria-label="Omar Nasser" >ON</span>
    </span>
        <div class="flex min-w-0 flex-1 flex-col gap-1">
            <header class="flex flex-wrap items-center gap-x-2 gap-y-1">
                <span class="text-label text-foreground">Omar Nasser</span>
                                    <span data-slot="badge"     class="inline-flex h-5 shrink-0 items-center gap-1 whitespace-nowrap rounded-[4px] border px-1.5 text-caption font-medium [&_svg]:size-3 border-nq-accent/40 bg-nq-accent/15 text-nq-accent-text"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M12 8V4H8"/>
  <rect width="16" height="12" x="4" y="8" rx="2"/>
  <path d="M2 14h2"/>
  <path d="M20 14h2"/>
  <path d="M15 13v2"/>
  <path d="M9 13v2"/>
</svg>                        Agent</span>
                                <span data-slot="badge"     class="inline-flex h-5 shrink-0 items-center gap-1 whitespace-nowrap rounded-[4px] border px-1.5 text-caption font-medium [&_svg]:size-3 border-nq-warning/40 bg-nq-warning-soft text-nq-warning-text">Awaiting review</span>
                <time data-slot="date-time" datetime="2026-09-29T09:09:00+00:00" dir="auto"  title="Sep 29, 2026"     class="tabular-nums [unicode-bidi:isolate] text-caption text-muted-foreground">9 minutes from now</time>
                                            </header>
                        <div data-slot="comment-body"  x-on:click="mentionClick($event)" class="[&amp;_a[href^=&#039;#mention-&#039;]]:cursor-default [&amp;_a[href^=&#039;#mention-&#039;]]:rounded-[4px] [&amp;_a[href^=&#039;#mention-&#039;]]:bg-nq-info-soft [&amp;_a[href^=&#039;#mention-&#039;]]:px-1 [&amp;_a[href^=&#039;#mention-&#039;]]:font-medium [&amp;_a[href^=&#039;#mention-&#039;]]:text-nq-info-text [&amp;_a[href^=&#039;#mention-&#039;]]:no-underline"><div data-slot="markdown" class="flex min-w-0 flex-col text-nq-fg-body gap-2 text-body-sm"><p data-slot="text" dir="auto" class="text-body text-nq-fg-body text-start">Pricing note waiting for review.</p>
</div>
</div>
                            <p  class="text-caption text-muted-foreground">Only you and moderators can see this until it is approved.</p>
                                                                <div >
                    <button data-slot="button"
     type="button"                         data-action="reply" x-on:click="startReply(&#039;c3&#039;)" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 hover:bg-nq-hover h-control-sm px-2.5 -ms-2 text-muted-foreground">
        <svg aria-hidden="true" class="rtl:-scale-x-100" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="m15 10 5 5-5 5"/>
  <path d="M4 4v7a4 4 0 0 0 4 4h12"/>
</svg>                        Reply</button>
                </div>
                    </div></div>
            <template x-teleport="body">
    <div data-slot="context-menu-content" x-bind="popup" x-init="popupEl = $el" x-nq-presence="open"
        class="fixed z-50 overflow-hidden rounded-floating border border-border bg-popover p-1.5 text-popover-foreground shadow-floating outline-none max-h-[var(--available-height)] overflow-y-auto transition-opacity duration-150 ease-nq data-starting-style:opacity-0 data-ending-style:opacity-0 min-w-44"><div data-slot="context-menu-item" role="menuitem" data-variant="default" x-bind="item"
        data-action="reply" x-on:click="startReply(&#039;c3&#039;)" class="relative flex h-nav-row min-h-[var(--nq-touch-min,0px)] cursor-default select-none items-center gap-2.5 rounded-control px-2.5 text-body-sm text-foreground outline-none data-highlighted:bg-nq-selected data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-muted-foreground"><svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="m15 10 5 5-5 5"/>
  <path d="M4 4v7a4 4 0 0 0 4 4h12"/>
</svg>Reply</div></div>
</template></div>
                    <ol  x-show="replyTo === 'c3'" x-cloak                         class="m-0 ms-4 flex list-none flex-col gap-3 border-s border-border p-0 ps-4">
                                                                            <li x-show="replyTo === 'c3'" x-cloak>
                                <form data-slot="comment-composer" data-composer="reply"  data-for="c3"  novalidate
    x-on:submit.prevent="submit('reply', 'c3')"
    x-on:keydown="key($event, 'reply', 'c3')"
    x-on:nq-mentions-change="mentions.reply = $event.detail.mentions"
    class="flex min-w-0 gap-3">
            <span data-slot="avatar" x-data="nqAvatar(0)"
    class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-8 text-caption rounded-full mt-0.5">
                    <span data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-bind="fallback"
             role="img" aria-label="Sara Ali" >SA</span>
    </span>
        <div class="flex min-w-0 flex-1 flex-col gap-2">
        <div data-slot="mention-textarea" x-data="nqMentionTextarea('', JSON.parse('{\u0022suggestions\u0022:[{\u0022id\u0022:\u0022u2\u0022,\u0022name\u0022:\u0022Omar Nasser\u0022},{\u0022id\u0022:\u0022u3\u0022,\u0022name\u0022:\u0022Lina Haddad\u0022}],\u0022strings\u0022:{\u0022list\u0022:\u0022Mentions\u0022,\u0022empty\u0022:\u0022No matches\u0022,\u0022count\u0022:\u0022{n} suggestions\u0022,\u0022person\u0022:\u0022People\u0022,\u0022team\u0022:\u0022Teams\u0022,\u0022group\u0022:\u0022Groups\u0022,\u0022teamOne\u0022:\u0022Team\u0022,\u0022groupOne\u0022:\u0022Group\u0022}}'))" x-modelable="text" x-id="['nq-mention']"
    x-model="drafts.reply" class="relative w-full">
    <textarea data-slot="textarea"
                x-bind="area" x-ref="area" rows="2" placeholder="Write a reply…" aria-label="Write a reply…" x-bind:disabled="busy !== &#039;&#039;" class="w-full min-w-0 rounded-control border border-input bg-card px-3 text-body text-foreground transition-colors duration-150 ease-nq outline-none placeholder:text-muted-foreground focus-visible:border-nq-focus focus-visible:outline-1 focus-visible:outline-nq-focus data-invalid:border-nq-danger aria-invalid:border-nq-danger disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:text-[16px] min-h-20 py-2"></textarea>
    <ul x-show="open()" x-cloak :id="listId()" role="listbox" aria-label="Mentions" data-slot="mention-list" :style="listStyle()" @mousedown.prevent
        class="absolute z-50 max-h-56 w-64 max-w-full overflow-y-auto rounded-floating border border-border bg-popover p-1 text-body-sm text-popover-foreground shadow-floating">
        <template x-for="r in rows()" :key="r.key">
            <li x-bind="row(r)">
                <span x-show="r.type === 'heading'" x-text="r.type === 'heading' ? heading(r.kind) : ''"></span>
                <span x-show="r.type === 'option' && (r.option.kind ?? 'person') === 'person'" class="relative inline-flex shrink-0">
                    <span data-slot="avatar" aria-hidden="true" class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-6 text-[10px] rounded-full">
                        <img x-show="r.type === 'option' && r.option.avatar" data-slot="avatar-image" :src="r.type === 'option' ? r.option.avatar : null" alt="" class="size-full object-cover" style="display: none">
                        <span x-show="r.type === 'option' && ! r.option.avatar" data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-text="r.type === 'option' ? initials(r.option.name) : ''"></span>
                    </span>
                    <span x-show="r.type === 'option' && r.option.presence" style="display: none" data-slot="presence-dot" aria-hidden="true"
                        :data-presence="r.type === 'option' ? r.option.presence : null"
                        :class="r.type === 'option' && r.option.presence ? presenceClass(r.option.presence) : ''"
                        class="absolute -end-0.5 -bottom-0.5 inline-block size-2.5 shrink-0 rounded-full border-2 border-popover"></span>
                </span>
                <span x-show="r.type === 'option' && (r.option.kind ?? 'person') !== 'person'" style="display: none" aria-hidden="true" class="inline-flex size-6 shrink-0 items-center justify-center rounded-control bg-secondary text-secondary-foreground">
                    <span class="flex [&_svg]:size-3.5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/>
  <path d="M16 3.128a4 4 0 0 1 0 7.744"/>
  <path d="M22 21v-2a4 4 0 0 0-3-3.87"/>
  <circle cx="9" cy="7" r="4"/>
</svg></span>
                </span>
                <span x-show="r.type === 'option'" class="flex min-w-0 flex-col">
                    <span class="truncate text-label text-foreground">
                        <span x-text="r.type === 'option' ? r.option.name : ''"></span>
                        <span x-show="r.type === 'option' && (r.option.kind ?? 'person') !== 'person'" style="display: none" class="sr-only" x-text="r.type === 'option' ? ' (' + kindLabel(r.option.kind) + ')' : ''"></span>
                    </span>
                    <span x-show="r.type === 'option' && r.option.description" style="display: none" class="truncate text-caption text-muted-foreground" x-text="r.type === 'option' ? r.option.description : ''"></span>
                </span>
            </li>
        </template>
    </ul>
    <div x-show="emptyShown()" x-cloak data-slot="mention-empty" :style="listStyle()"
        class="absolute z-50 w-64 max-w-full rounded-floating border border-border bg-popover px-3 py-2 text-body-sm text-muted-foreground shadow-floating">No matches</div>
    <span role="status" class="sr-only" x-text="status()"></span>
    </div>
        <p x-show="err.reply" x-cloak x-text="err.reply" role="alert" class="text-body-sm text-nq-danger-text"></p>
        <div class="flex items-center justify-end gap-2">
                            <button data-slot="button"
     type="button"                         x-on:click="cancelReply()" x-bind:disabled="busy !== &#039;&#039;" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-foreground hover:bg-nq-hover h-control-sm px-2.5">
        Cancel</button>
                        <button data-slot="button"
     type="submit"                         x-bind:disabled="empty(&#039;reply&#039;) || busy !== &#039;&#039;" x-bind:aria-busy="busy === &#039;reply&#039;" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:bg-[color-mix(in_oklab,var(--nq-action)_88%,var(--nq-fg))] h-control-sm px-2.5">
        <svg data-slot="spinner" aria-hidden="true" x-show="busy === &#039;reply&#039;" x-cloak="1" class="animate-spin motion-reduce:animate-none size-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M21 12a9 9 0 1 1-6.219-8.56"/>
</svg>                Reply</button>
        </div>
    </div>
</form>
                            </li>
                                            </ol>
                </li>
                    </ol>
                            <form data-slot="comment-composer" data-composer="main"  novalidate
    x-on:submit.prevent="submit('main')"
    x-on:keydown="key($event, 'main')"
    x-on:nq-mentions-change="mentions.main = $event.detail.mentions"
    class="flex min-w-0 gap-3">
            <span data-slot="avatar" x-data="nqAvatar(0)"
    class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-8 text-caption rounded-full mt-0.5">
                    <span data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-bind="fallback"
             role="img" aria-label="Sara Ali" >SA</span>
    </span>
        <div class="flex min-w-0 flex-1 flex-col gap-2">
        <div data-slot="mention-textarea" x-data="nqMentionTextarea('', JSON.parse('{\u0022suggestions\u0022:[{\u0022id\u0022:\u0022u2\u0022,\u0022name\u0022:\u0022Omar Nasser\u0022},{\u0022id\u0022:\u0022u3\u0022,\u0022name\u0022:\u0022Lina Haddad\u0022}],\u0022strings\u0022:{\u0022list\u0022:\u0022Mentions\u0022,\u0022empty\u0022:\u0022No matches\u0022,\u0022count\u0022:\u0022{n} suggestions\u0022,\u0022person\u0022:\u0022People\u0022,\u0022team\u0022:\u0022Teams\u0022,\u0022group\u0022:\u0022Groups\u0022,\u0022teamOne\u0022:\u0022Team\u0022,\u0022groupOne\u0022:\u0022Group\u0022}}'))" x-modelable="text" x-id="['nq-mention']"
    x-model="drafts.main" class="relative w-full">
    <textarea data-slot="textarea"
                x-bind="area" x-ref="area" rows="2" placeholder="Write a comment…" aria-label="Write a comment…" x-bind:disabled="busy !== &#039;&#039;" class="w-full min-w-0 rounded-control border border-input bg-card px-3 text-body text-foreground transition-colors duration-150 ease-nq outline-none placeholder:text-muted-foreground focus-visible:border-nq-focus focus-visible:outline-1 focus-visible:outline-nq-focus data-invalid:border-nq-danger aria-invalid:border-nq-danger disabled:cursor-not-allowed disabled:opacity-50 pointer-coarse:text-[16px] min-h-20 py-2"></textarea>
    <ul x-show="open()" x-cloak :id="listId()" role="listbox" aria-label="Mentions" data-slot="mention-list" :style="listStyle()" @mousedown.prevent
        class="absolute z-50 max-h-56 w-64 max-w-full overflow-y-auto rounded-floating border border-border bg-popover p-1 text-body-sm text-popover-foreground shadow-floating">
        <template x-for="r in rows()" :key="r.key">
            <li x-bind="row(r)">
                <span x-show="r.type === 'heading'" x-text="r.type === 'heading' ? heading(r.kind) : ''"></span>
                <span x-show="r.type === 'option' && (r.option.kind ?? 'person') === 'person'" class="relative inline-flex shrink-0">
                    <span data-slot="avatar" aria-hidden="true" class="inline-flex shrink-0 select-none items-center justify-center overflow-hidden bg-secondary align-middle font-medium text-secondary-foreground size-6 text-[10px] rounded-full">
                        <img x-show="r.type === 'option' && r.option.avatar" data-slot="avatar-image" :src="r.type === 'option' ? r.option.avatar : null" alt="" class="size-full object-cover" style="display: none">
                        <span x-show="r.type === 'option' && ! r.option.avatar" data-slot="avatar-fallback" class="flex size-full items-center justify-center" x-text="r.type === 'option' ? initials(r.option.name) : ''"></span>
                    </span>
                    <span x-show="r.type === 'option' && r.option.presence" style="display: none" data-slot="presence-dot" aria-hidden="true"
                        :data-presence="r.type === 'option' ? r.option.presence : null"
                        :class="r.type === 'option' && r.option.presence ? presenceClass(r.option.presence) : ''"
                        class="absolute -end-0.5 -bottom-0.5 inline-block size-2.5 shrink-0 rounded-full border-2 border-popover"></span>
                </span>
                <span x-show="r.type === 'option' && (r.option.kind ?? 'person') !== 'person'" style="display: none" aria-hidden="true" class="inline-flex size-6 shrink-0 items-center justify-center rounded-control bg-secondary text-secondary-foreground">
                    <span class="flex [&_svg]:size-3.5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2"/>
  <path d="M16 3.128a4 4 0 0 1 0 7.744"/>
  <path d="M22 21v-2a4 4 0 0 0-3-3.87"/>
  <circle cx="9" cy="7" r="4"/>
</svg></span>
                </span>
                <span x-show="r.type === 'option'" class="flex min-w-0 flex-col">
                    <span class="truncate text-label text-foreground">
                        <span x-text="r.type === 'option' ? r.option.name : ''"></span>
                        <span x-show="r.type === 'option' && (r.option.kind ?? 'person') !== 'person'" style="display: none" class="sr-only" x-text="r.type === 'option' ? ' (' + kindLabel(r.option.kind) + ')' : ''"></span>
                    </span>
                    <span x-show="r.type === 'option' && r.option.description" style="display: none" class="truncate text-caption text-muted-foreground" x-text="r.type === 'option' ? r.option.description : ''"></span>
                </span>
            </li>
        </template>
    </ul>
    <div x-show="emptyShown()" x-cloak data-slot="mention-empty" :style="listStyle()"
        class="absolute z-50 w-64 max-w-full rounded-floating border border-border bg-popover px-3 py-2 text-body-sm text-muted-foreground shadow-floating">No matches</div>
    <span role="status" class="sr-only" x-text="status()"></span>
    </div>
        <p x-show="err.main" x-cloak x-text="err.main" role="alert" class="text-body-sm text-nq-danger-text"></p>
        <div class="flex items-center justify-end gap-2">
                        <button data-slot="button"
     type="submit"                         x-bind:disabled="empty(&#039;main&#039;) || busy !== &#039;&#039;" x-bind:aria-busy="busy === &#039;main&#039;" class="inline-flex shrink-0 select-none items-center justify-center gap-2 whitespace-nowrap rounded-control border border-transparent font-sans text-label transition-colors duration-150 ease-nq min-h-[var(--nq-touch-min,0px)] outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-nq-focus disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 bg-primary text-primary-foreground hover:bg-[color-mix(in_oklab,var(--nq-action)_88%,var(--nq-fg))] h-control-sm px-2.5">
        <svg data-slot="spinner" aria-hidden="true" x-show="busy === &#039;main&#039;" x-cloak="1" class="animate-spin motion-reduce:animate-none size-3.5" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
  <path d="M21 12a9 9 0 1 1-6.219-8.56"/>
</svg>                Comment</button>
        </div>
    </div>
</form>
            </section>
</div>
```
