<% content_for(:native_title, t('archived')) if turbo_native_app? %> <% filter_params = params.permit(Submissions::Filter::ALLOWED_PARAMS - %w[template_id]).compact_blank %> <% if turbo_native_app? %> <% end %> <% with_filters = @pagy.pages > 1 || params[:q].present? || filter_params.present? %> <% unless turbo_native_app? %> <%= render 'templates/title', template: @template %>
<%= link_to template_path(@template), class: 'flex items-center mb-1 md:mb-0' do %> <%= svg_icon('chevron_left', class: 'w-5 h-5') %> <%= t('back_to_active') %> <% end %>
<% end %>
<% unless turbo_native_app? %>

<%= t('submissions') %> <%= t('archived') %>

<% end %>
<% if with_filters %> <%= render 'shared/search_input' %> <% end %>
<%= render 'submissions_filters/applied_filters', filter_params:, with_status: true, with_default_status: true %> <% unless turbo_native_app? %> <% end %> <%= render 'submissions_filters/filter_button', filter_params: %>
<% if @pagy.count.nil? || @pagy.count > 0 %>
<%= render partial: 'templates/submission', collection: @submissions, locals: { template: @template, archived: true } %> <%= render 'shared/infinite_scroll', pagy: @pagy if turbo_native_app? %>
<% elsif params[:q].present? || filter_params.present? %>
<%= t('submissions_not_found') %>
<% end %> <%= render 'shared/pagination', pagy: @pagy, items_name: 'submissions' %>