<%= link_to root_path do %>
    ←
    Home
  <% end %>
  
    <%= svg_icon('folder', class: 'w-9 h-9 flex-shrink-0') %>
    
      <%= @template_folder.name %>
    
    <% if can?(:update, @template_folder) && @template_folder.name != TemplateFolder::DEFAULT_NAME %>
      
        
          <%= svg_icon('pencil', class: 'w-7 h-7') %>
        
      
    <% end %>
  
  
    <% if params[:q].present? || @pagy.pages > 1 %>
      <%= render 'shared/search_input' %>
    <% end %>
    <% if can?(:create, ::Template) %>
      <%= render 'templates/upload_button', folder_name: @template_folder.name %>
      <%= link_to new_template_path(folder_name: @template_folder.name), class: 'btn btn-primary text-base btn-md gap-2', data: { turbo_frame: :modal } do %>
        <%= svg_icon('plus', class: 'w-6 h-6 stroke-2') %>
        Create
      <% end %>
    <% end %>
  
 
<% if @pagy.count > 0 %>
  
    <%= render partial: 'templates/template', collection: @templates %>
  
  <%= render 'shared/pagination', pagy: @pagy, items_name: 'templates' %>
<% elsif params[:q].present? %>
  
<% end %>