<%
  item_css = ['list-item']
  item_css << ' active' if (request.format.html? and @note == note)
%>

<%= content_tag :div, id: "#{dom_id(note)}_link", class: item_css.join do %>

  <%= link_to project_node_note_path(@node.project, @node, note) do %>
    <i class="fa-solid fa-file-text list-item-icon"></i>
    <%= note.title %>
  <% end %>

  <div class="list-item-actions">
    <%= link_to edit_project_node_note_path(@node.project, @node, note), class:'list-item-action-edit' do %>
      <i class="fa-solid fa-pencil fa-fw"></i><span class="visually-hidden">Edit</span>
    <% end %>

    <%= link_to [@node.project, @node, note],
          method: :delete,
          data: { confirm: "Are you sure?\n\nProceeding will delete this note from the associated node." },
          class: 'list-item-action-delete' do %>
      <i class="fa-solid fa-trash fa-fw"></i><span class="visually-hidden">Delete</span>
    <% end %>
  </div>

<% end %>
