<% @page_title = @user_filtering.selected_boards_label %>
<% turbo_exempts_page_from_cache %>

<%= render "cards/broadcasts", filter: @filter %>

<% content_for :header do %>
  <h1 class="header__title divider divider--fade full-width" data-bridge--title-target="header">
    <span class="overflow-ellipsis txt-capitalize-first-letter"><%= @user_filtering.selected_boards_label %></span>
  </h1>

  <div class="header__actions header__actions--end">
    <% if board = @filter.single_board %>
      <%= link_to_edit_board board %>
    <% end %>
  </div>
<% end %>

<%= render "filters/settings", filter_url: cards_path, user_filtering: @user_filtering, no_filtering_url: cards_path %>

<%= turbo_frame_tag :cards_container do %>
  <section class="cards cards--grid">
    <div class="cards__list hide-scrollbar">
      <%= with_automatic_pagination :cards_paginated_container, @page do %>
        <%= render "cards/display/previews", cards: @page.records, draggable: true %>
      <% end %>
      <div class="blank-slate">No cards match this filter</div>
    </div>
  </section>
<% end %>
