{{ define "repo/pulls/fragments/pullState" }}
  {{ $bgColor := "bg-gray-800 dark:bg-gray-700" }}
  {{ $icon := "ban" }}

  {{ if .IsOpen }}
      {{ $bgColor = "bg-green-600 dark:bg-green-700" }}
      {{ $icon = "git-pull-request" }}
  {{ else if .IsMerged }}
      {{ $bgColor = "bg-purple-600 dark:bg-purple-700" }}
      {{ $icon = "git-merge" }}
  {{ else if .IsAbandoned }}
      {{ $bgColor = "bg-red-600 dark:bg-red-700" }}
      {{ $icon = "git-pull-request-closed" }}
  {{ end }}

  <span class="inline-flex items-center rounded px-2 py-[5px] {{ $bgColor }} text-sm">
      {{ i $icon "w-3 h-3 mr-1.5 text-white" }}
      <span class="text-white">{{ .String }}</span>
  </span>
{{ end }}


