{{ define "user/fragments/follow" }}
  <button id="{{ normalizeForHtmlId .UserDid }}"
    class="btn w-full flex gap-2 items-center group"

    {{ if eq .FollowStatus.String "IsNotFollowing" }}
    hx-post="/follow?subject={{.UserDid}}"
    {{ else }}
    hx-delete="/follow?subject={{.UserDid}}"
    {{ end }}

    hx-trigger="click"
    hx-target="#{{ normalizeForHtmlId .UserDid }}"
    hx-swap="outerHTML"
    >
    {{ if eq .FollowStatus.String "IsNotFollowing" }}
      {{ i "user-round-plus" "size-4 inline group-[.htmx-request]:hidden" }} 
      {{ i "loader-circle" "size-4 animate-spin hidden group-[.htmx-request]:inline" }}
      Follow
    {{ else }}
      {{ i "user-round-minus" "size-4 inline group-[.htmx-request]:hidden" }} 
      {{ i "loader-circle" "size-4 animate-spin hidden group-[.htmx-request]:inline" }}
      Unfollow
    {{ end }}
  </button>
{{ end }}
