<div class="comment-box">
  <div class="comment-header">
    <%= render Shared::CommentsCountComponent.new(0) %>
  </div>

  <div class="comments-wrapper">
    <div class="comment-input">
      <% if !@process.allegations_phase.open? %>
        <div data-alert class="callout primary">
          <%= t("legislation.annotations.form.phase_not_open") %>
        </div>
      <% elsif user_signed_in? %>
        <%= form_for Legislation::Annotation.new, url: legislation_process_draft_version_annotations_path(@process, @draft_version), remote: true do |f| %>
          <%= f.text_area :text %>

          <div class="comment-actions">
            <a class="cancel-comment" href="#" data-cancel-annotation><%= t("legislation.annotations.comments.cancel") %></a>
            <%= f.submit value: t("legislation.annotations.comments.publish_comment"), class: "button publish-comment" %>
          </div>

          <%= f.hidden_field :quote %>
          <%= f.hidden_field :ranges %>
        <% end %>
      <% else %>
        <%= render "shared/login_to_comment" %>
      <% end %>
    </div>
  </div>
</div>
