<%= icon("arrow-bottom", class: "icon", aria_label: categories_label, role: "img") %> <%= categories_label %>
<%= icon("arrow-bottom", class: "icon", aria_label: subcategories_label, role: "img") %> <%= subcategories_label %>
<%= render partial: "search" %>
<% first_class_categories.each do |category| %> <% next if (category_results_count = count_calculator(current_scope, category.id)) == 0 %>

<%= link_to translated_attribute(category.name),results_path(filter: { category_id: category, scope_id: current_scope }) %>

<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, category.id).present? %>
<% end %>
<% if component_settings.display_progress_enabled? && progress_calculator(current_scope, category.id).present? %>
<%= display_percentage progress_calculator(current_scope, category.id) %>
<% end %>
<%= display_count(category_results_count) if category_results_count && category_results_count > 0 %>
<% category.subcategories.each do |subcategory| %> <% if (subcategory_results_count = count_calculator(current_scope, subcategory.id)) > 0 %> <%= link_to results_path(filter: { category_id: subcategory, scope_id: current_scope }), class: "medium-4 columns end card__link card__link--block" do %>
<%= translated_attribute(subcategory.name) %> <% if component_settings.display_progress_enabled? && progress_calculator(current_scope, subcategory.id).present? %>
<%= display_percentage progress_calculator(current_scope, subcategory.id) %>
<% end %>
<%= display_count subcategory_results_count %>
<% end %> <% end %> <% end %>
<% end %>