<% cache filters_cache_key('desktop') do %>
<%= clear_all_filters_link(permitted_params) if product_filters_present?(permitted_params) %>
<% available_option_types.each do |option_type| %>
<% ot_filter_param = option_type.filter_param %> <% option_type_name = ot_filter_param.titleize %> <% collapsed = params[ot_filter_param].blank? %>
<% end %> <% available_properties.each do |property| %> <% if property.uniq_values.present? %>
<% property_name = property.name %> <% collapsed = params.dig(:properties, property.filter_param).blank? %>
<% end %> <% end %> <% price_collapsed = params[:price].blank? %>
<% price_filters.each do |price_range| %> <%= price_filter_link(price_range, permitted_params) %> <% end %>
<%= min_price_filter_input class: 'w-50 p-2 mr-1' %> <%= max_price_filter_input class: 'w-50 p-2' %>
<%= link_to Spree.t('plp.done'), permitted_params, class: 'btn btn-primary spree-btn w-100', data: { params: permitted_params } %>
<% additional_filters_partials.each do |partial| %> <%= render "spree/products/filters/#{partial}", permitted_params: permitted_params %> <% end %>
<% end %>