{{define "content"}}
<div class="error-box" id="error" role="alert"></div>
<div id="task-root" data-task-id="{{.Data.TaskID}}" data-user-id="{{.User.ID}}"
  data-is-consultant="{{if .User.Roles.Consultant}}1{{end}}"
  data-is-admin="{{if .User.Roles.Admin}}1{{end}}"
  data-is-developer="{{if .User.Roles.Developer}}1{{end}}">
  <p class="muted">Loading task…</p>
</div>

<dialog id="review-dialog">
  <form method="dialog" id="review-form" class="stack" style="min-width:460px">
    <h2>Review submission</h2>
    <div id="review-checklist" class="stack"></div>
    <div class="field">
      <label for="review-note">Review note</label>
      <textarea id="review-note"></textarea>
    </div>
    <div class="spread">
      <button class="btn" type="button" id="review-cancel">Cancel</button>
      <span>
        <button class="btn danger" type="button" id="review-changes">Request changes</button>
        <button class="btn primary" type="button" id="review-approve">Approve &amp; award bounty</button>
      </span>
    </div>
  </form>
</dialog>

<dialog id="ai-dialog">
  <form method="dialog" id="ai-form" class="stack" style="min-width:420px">
    <h2>Assign to AI work performer</h2>
    <div class="field">
      <label for="ai-repo">Repository URL (optional)</label>
      <input type="text" id="ai-repo" placeholder="https://github.com/org/repo.git">
    </div>
    <div class="field">
      <label for="ai-branch">Branch (optional)</label>
      <input type="text" id="ai-branch" placeholder="main">
    </div>
    <div class="field">
      <label for="ai-instructions">Extra instructions (optional)</label>
      <textarea id="ai-instructions"></textarea>
    </div>
    <div class="spread">
      <button class="btn" type="button" id="ai-cancel">Cancel</button>
      <button class="btn primary" type="submit">Create AI job</button>
    </div>
  </form>
</dialog>
{{end}}
