<%= link_to(@is_archived ? templates_shared_index_path : root_path, class: 'flex items-center') do %> <%= svg_icon('chevron_left', class: 'w-5 h-5') %> <%= @is_archived ? t('back_to_active') : t('home') %> <% end %>

<%= svg_icon('folder', class: 'w-9 h-9 flex-shrink-0') %> <%= t('shared') %> <% if @is_archived %> <%= t('archived') %> <% end %>

<% if params[:q].present? || @pagy.pages > 1 %> <%= render 'shared/search_input' %> <% end %>
<% view_archived_html = capture do %> <% if @has_archived %>
<%= t('view_archived') %>
<% end %> <% end %> <% if @pagy.count.nil? || @pagy.count > 0 %>
<%= render partial: 'templates/template', collection: @templates %>
<% elsif params[:q].present? %>
<%= t('templates_not_found') %>
<% end %> <% if @pagy.pages > 1 %> <%= render 'shared/pagination', pagy: @pagy, items_name: 'templates', left_additional_html: view_archived_html %> <% else %>
<%= view_archived_html %>
<% end %>