<%
  item_css = ['list-item']
  item_css << ' active' if @card == card
%>

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

  <%= link_to project_board_list_card_path(current_project, @board, @list, card) do %>
    <i class="fa-regular fa-address-card list-item-icon"></i>
    <%= card.name %>
  <% end %>

  <div class="list-item-actions">
    <%= link_to edit_project_board_list_card_path(current_project, @board, @list, card), class:'list-item-action-edit' do %>
      <i class="fa-solid fa-pencil fa-fw"></i><span class="visually-hidden">Edit</span>
    <% end %>

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

<% end %>
