<%= render Moderation::Shared::IndexComponent.new(@proposal_notifications) do %>
  <table>
    <thead>
      <tr>
        <th><%= t("moderation.proposal_notifications.index.headers.proposal_notification") %></th>
        <th><%= t("moderation.proposal_notifications.index.headers.moderate") %></th>
      </tr>
    </thead>

    <tbody>
      <% @proposal_notifications.each do |proposal_notification| %>
        <tr id="proposal_notification_<%= proposal_notification.id %>">
          <td>
            <%= link_to proposal_notification.title, proposal_notification %>
            <br>
            <span class="date"><%= l proposal_notification.updated_at.to_date %></span>
            <br>
            <div class="moderation-description">
              <%= proposal_notification.body %>
            </div>
          </td>
          <td class="text-center">
            <%= check_box_tag "proposal_notification_ids[]",
                              proposal_notification.id,
                              nil,
                              id: "#{dom_id(proposal_notification)}_check",
                              "aria-label": proposal_notification.title %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% end %>
