<div class="flex" id="<%= dom_id(card, :assignees) %>">
  <% card.assignees.each do |assignee| %>
    <%= avatar_tag assignee, class: "avatar" %>
  <% 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 fill-transparent" data-action="click->dialog#open:stop">
      <%= 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>
