{{ define "repo/pulls/fragments/pullStack" }}
{{ range $pull := .Stack }} {{ $isCurrent := false }} {{ with $.Pull }} {{ $isCurrent = eq $pull.PullId $.Pull.PullId }} {{ end }}
{{ block "summarizedHeader" (list $pull $) }} {{ end }} {{ if $isCurrent }} {{ i "arrow-left" "w-4 h-4" }} {{ end }}
{{ end }}
{{ end }} {{ define "summarizedHeader" }} {{ $pull := index . 0 }} {{ $root := index . 1 }}
{{ block "summarizedPullState" $pull }} {{ end }} #{{ $pull.PullId }} {{ $pull.Title }}
{{ end }} {{ define "summarizedPullState" }} {{ $fgColor := "text-gray-600 dark:text-gray-300" }} {{ $icon := "ban" }} {{ if .State.IsOpen }} {{ $fgColor = "text-green-600 dark:text-green-500" }} {{ $icon = "git-pull-request" }} {{ else if .State.IsMerged }} {{ $fgColor = "text-purple-600 dark:text-purple-500" }} {{ $icon = "git-merge" }} {{ end }} {{ $style := printf "w-4 h-4 %s" $fgColor }} {{ i $icon $style }} {{ end }}