<div class="card-perma__notch card-perma__notch--bottom flex-column" id="<%= dom_id(card, :card_closure_toggle) %>">
  <% if card.closed? %>
    <div class="flex gap-half margin-block-start-double margin-block-end">
      <span class="card-perma__closure-message">Completed by <%= card.closed_by.name %> on <%= local_datetime_tag(card.closed_at, style: :shortdate) %>.</span>
      <%= button_to card_closure_path(card), method: :delete, class: "btn btn--plain borderless fill-transparent" do %>
        <span class="pad-inline-end">Undo</span>
      <% end %>
    </div>
  <% else %>
    <%= button_to card_closure_path(card), class: "btn borderless" do %>
      <span class="overflow-ellipsis">Mark as Done</span>
    <% end %>
    <% if card.entropic? && card.open? %>
      <div class="card-perma__closure-message">
        Closes as “Not Now” <%= local_datetime_tag(card.entropy.auto_clean_at, style: :indays) -%> if there’s no activity.
      </div>
    <% end %>
  <% end %>
</div>
