<div class="display-contents" id="<%= dom_id(card, :assignees) %>">
  <% card.assignees.each do |assignee| %>
    <%= avatar_tag assignee, tabindex: (local_assigns.key?(:preview) && local_assigns[:preview]) ? -1 : 0 %>
  <% end %>

  <div class="position-relative" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside" <%= "hidden" if card.closed? %>>
    <button class="btn card__hide-on-index" data-action="click->dialog#open:stop" style="--btn-background: var(--card-bg-color);" data-controller="tooltip">
      <%= icon_tag "person-add" %>
      <span class="for-screen-reader">Assign</span>
    </button>

    <dialog class="popup panel flex-column align-start gap-half fill-white shadow" data-dialog-target="dialog">
      <%= yield %>
    </dialog>
  </div>
</div>
