<div class="small-12 column section-recommended padding">
  <div class="row">

    <h2 class="text-center"><%= t("welcome.recommended.title") %></h2>
    <div class="small-12 column carousel-image">
      <% if recommended_debates.any? %>
        <% carousel_size = calculate_carousel_size(recommended_debates, recommended_proposals, true) %>
        <%= render "recommended_carousel", recommendeds: recommended_debates,
                                           key: "debates",
                                           image_field: nil,
                                           image_version: nil,
                                           image_default: nil,
                                           carousel_size: carousel_size,
                                           btn_text_link: t("welcome.recommended.debates.btn_text_link"),
                                           btn_path_link: debates_path(order: "recommendations") %>
      <% end %>

      <% if recommended_proposals.any? %>
        <% carousel_size = calculate_carousel_size(recommended_debates, recommended_proposals, false) %>
        <%= render "recommended_carousel", recommendeds: recommended_proposals,
                                           key: "proposals",
                                           image_field: :attachment,
                                           image_version: :thumb,
                                           image_default: nil,
                                           carousel_size: carousel_size,
                                           btn_text_link: t("welcome.recommended.proposals.btn_text_link"),
                                           btn_path_link: proposals_path(order: "recommendations")  %>
      <% end %>
    </div>
  </div>
</div>
