<% if template.deleted_at? && can?(:update, template) %>
      <%= button_to template_restore_index_path(template), class: 'btn btn-xs hover:btn-outline bg-base-200 btn-circle' do %>
        <%= svg_icon('rotate', class: 'w-4 h-4 enabled') %>
        <%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %>
      <% end %>
    <% elsif can?(:update, template) %>
      
        <%= svg_icon('pencil', class: 'w-4 h-4') %>
      
    <% end %>
    <% if can?(:create, template) %>
      
        <%= svg_icon('copy', class: 'w-4 h-4') %>
      
    <% end %>
    <% if !template.deleted_at? && can?(:destroy, template) %>
      <%= button_to template_path(template), data: { turbo_confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-xs hover:btn-outline bg-base-200 btn-circle', aria_label: 'Restore' do %>
        <%= svg_icon('trash', class: 'w-4 h-4 enabled') %>
        <%= svg_icon('loader', class: 'w-4 h-4 animate-spin disabled') %>
      <% end %>
    <% end %>