<div id="<%= dom_id(card, :pin_button) %>">
  <% if card.pinned_by? Current.user %>
    <%= button_to card_pin_path(card), method: :delete, class: "btn btn--reversed btn--circle-mobile",
          data: { controller: "tooltip hotkey", action: "keydown.shift+p@document->hotkey#click", bridge__overflow_menu_target: "item", bridge_title: "Unpin this card" } do %>
      <%= icon_tag "pinned" %> <span class="for-screen-reader">Unpin this card (shift+p)</span>
    <% end %>
  <% else %>
    <%= button_to card_pin_path(card), class: "btn btn--circle-mobile",
          data: { controller: "tooltip hotkey", action: "keydown.shift+p@document->hotkey#click", bridge__overflow_menu_target: "item", bridge_title: "Pin this card" } do %>
      <%= icon_tag "unpinned" %> <span class="for-screen-reader">Pin this card (shift+p)</span>
    <% end %>
  <% end %>
</div>
