<% if completed_at_range.present? %>
        
          <%= link_to filter_templates_path(params.to_unsafe_h.except(:controller, :action).merge(filter: 'completed_at')), data: { turbo_frame: 'modal' }, class: 'flex items-center space-x-1' do %>
            <%= svg_icon('calendar_check', class: 'w-5 h-5 shrink-0') %>
            
              <% if completed_at_range.begin&.to_date == completed_at_range.end&.to_date %>
                <%= l(completed_at_range.begin.to_date, locale: current_account.locale) %>
              <% else %>
                <%= completed_at_range.begin ? l(completed_at_range.begin.to_date, locale: current_account.locale) : '∞' %>
                -
                <%= completed_at_range.end ? l(completed_at_range.end.to_date, locale: current_account.locale) : t('today') %>
              <% end %>
            
          <% end %>
          <%= link_to url_for(params.to_unsafe_h.except(:completed_at)), class: 'rounded-lg ml-1 hover:bg-neutral-700 hover:text-white' do %>
            <%= svg_icon('x', class: 'w-5 h-5') %>
          <% end %>
        
      <% end %>
      <% if @created_at_range.present? %>
        
          <%= link_to filter_templates_path(params.to_unsafe_h.except(:controller, :action).merge(filter: 'created_at')), data: { turbo_frame: 'modal' }, class: 'flex items-center space-x-1' do %>
            <%= svg_icon('calendar', class: 'w-5 h-5 shrink-0') %>
            
              <% if created_at_range.begin&.to_date == created_at_range.end&.to_date %>
                <%= l(created_at_range.begin.to_date, locale: current_account.locale) %>
              <% else %>
                <%= created_at_range.begin ? l(created_at_range.begin.to_date, locale: current_account.locale) : '∞' %>
                -
                <%= created_at_range.end ? l(created_at_range.end.to_date, locale: current_account.locale) : t('today') %>
              <% end %>
            
          <% end %>
          <%= link_to url_for(params.to_unsafe_h.except(:created_at)), class: 'rounded-lg ml-1 hover:bg-neutral-700 hover:text-white' do %>
            <%= svg_icon('x', class: 'w-5 h-5') %>
          <% end %>
        
      <% end %>
      <% if params[:author].present? %>
        
          <%= link_to filter_templates_path(params.to_unsafe_h.except(:controller, :action).merge(filter: 'author')), data: { turbo_frame: 'modal' }, class: 'flex items-center space-x-1 w-full md:w-36' do %>
            <%= svg_icon('user', class: 'w-5 h-5 shrink-0') %>
            <%= params[:author] %>
          <% end %>
          <%= link_to url_for(params.to_unsafe_h.except(:author)), class: 'rounded-lg ml-1 hover:bg-neutral-700 hover:text-white' do %>
            <%= svg_icon('x', class: 'w-5 h-5') %>
          <% end %>
        
      <% end %>
      
        
        
          - 
            <%= link_to filter_templates_path(params.to_unsafe_h.except(:controller, :action).merge(filter: 'author')), data: { turbo_frame: 'modal' } do %>
              <%= svg_icon('user', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
              <%= t('author') %>
            <% end %>
          
 
          - 
            <%= link_to filter_templates_path(params.to_unsafe_h.except(:controller, :action).merge(filter: 'created_at')), data: { turbo_frame: 'modal' } do %>
              <%= svg_icon('calendar', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
              <%= t('created_at') %>
            <% end %>
          
 
          - 
            <%= link_to filter_templates_path(params.to_unsafe_h.except(:controller, :action).merge(filter: 'completed_at')), data: { turbo_frame: 'modal' } do %>
              <%= svg_icon('calendar_check', class: 'w-5 h-5 flex-shrink-0 stroke-2') %>
              <%= t('completed_at') %>
            <% end %>