<% if proposals.any? %>
  <h3><%= page_entries_info proposals %></h3>

  <%= render "shared/order_links", i18n_namespace: "admin.legislation.processes.proposals" %>

  <table class="stack" id="legislation_proposals_list">
    <thead>
      <tr>
        <th class="text-center"><%= t("admin.legislation.proposals.index.id") %></th>
        <th><%= Legislation::Proposal.human_attribute_name(:title) %></th>
        <th class="text-center"><%= t("admin.legislation.proposals.index.supports") %></th>
        <th><%= t("admin.proposals.index.selected") %></th>
      </tr>
    </thead>

    <tbody>
      <% proposals.each do |proposal| %>
        <tr id="<%= dom_id(proposal) %>" class="legislation_proposal">
          <td class="text-center"><%= proposal.id %></td>
          <td><%= proposal.title %></td>
          <td class="text-center"><%= proposal.votes_score %></td>
          <td><%= render Admin::Proposals::ToggleSelectionComponent.new(proposal) %></td>
        </tr>
      <% end %>
    </tbody>
  </table>

  <%= paginate proposals %>
<% end %>
