<%= pb_rails("flex", props: {orientation: "row", padding_right: "lg", vertical: "center"}) do %> <% if (object.template != "sort_only") %> <%= pb_rails("circle_icon_button", props: { variant: "secondary", icon: "filter", id:"filter#{object.id}"}) %>
<% object.filters.each do |filter| %> <% if filter[:name]== "" %>
<%= pb_rails("body", props: { color: "light", padding_left: "xs", size: 4, tag:"h4", text: "No Filter Selected" }) %>
<% else %>
<%= pb_rails("caption", props: { text: filter[:name]}) %> <%= pb_rails("title", props: { size: 4, tag:"h4", text: filter[:value]}) %>
<% end %> <% end %>
<% if (object.template != "default") %> <%= pb_rails("caption", props: {text: object.result_text, size:"xs", classname:"filter-results"})%> <% end %> <% end %> <% if (object.template == "single" ) || (object.template == "sort_only") %> <% unless object.sort_menu == [{}] %> <%= pb_rails("button", props: {variant: "link",id: "sort-button#{object.id}",padding_right: "none"}) do %> <% object.sort_menu.each do |item| %> <% if item[:active] == true %> <%= item[:item] %> <%= pb_rails("icon", props: { icon: object.sort_icon(item[:direction]), fixed_width: true }) %> <% end %> <% end %> <% end %> <% end %> <% end %> <% end %> <% if (object.template == "default")%> <%= pb_rails("section_separator") %> <%= pb_rails("flex", props: {orientation: "row", vertical: "center", spacing: "between", classname: "filter-bottom"}) do %> <%= pb_rails("title_count", props: {title: "Results:",count: object.results, align:"center"}) %> <%= pb_rails("flex", props: {orientation: "row", vertical: "center"}) do %> <%= pb_rails("caption", props: { text: "sort by:"}) %> <%= pb_rails("button", props: {variant: "link", padding_right: "none", id: "sort-button#{object.id}"}) do %> <% object.sort_menu.each do |item| %> <% if item[:active] == true %> <%= item[:item] %> <%= pb_rails("icon", props: { icon: object.sort_icon(item[:direction]), fixed_width: true }) %> <% end %> <% end %> <% end %> <% end %> <% end %> <% end %>