{{ end }}
{{ end }}
{{ define "vouchTimelineItem" }}
{{ $profileDid := index . 0 }}
{{ $viewerDid := index . 1 }}
{{ $v := index . 2 }}
{{ $evidencePulls := index . 3 }}
{{ $evidenceIssues := index . 4 }}
{{ $isOutgoing := eq $v.Did $profileDid }}
{{ $isVouch := $v.IsVouch }}
{{ $isSelf := eq $profileDid $viewerDid }}
{{ if $isVouch }}
{{ if $isOutgoing }}
{{ i "arrow-up-right" "size-5 text-green-500 dark:text-green-400" }}
{{ else }}
{{ i "arrow-down-left" "size-5 text-green-500 dark:text-green-400" }}
{{ end }}
{{ else }}
{{ if $isOutgoing }}
{{ i "arrow-up-right" "size-5 text-red-500 dark:text-red-400" }}
{{ else }}
{{ i "arrow-down-left" "size-5 text-red-500 dark:text-red-400" }}
{{ end }}
{{ end }}
{{ if and $isSelf $isOutgoing }}
you
{{ else }}
{{ resolve $v.Did.String }}
{{ end }}
{{ if $isVouch }}vouched for{{ else }}denounced{{ end }}
{{ if and $isSelf (not $isOutgoing) }}
you
{{ else }}
{{ resolve $v.SubjectDid.String }}
{{ end }}
{{ relTimeFmt $v.CreatedAt }}
{{ with $v.Reason }}
{{ . }}
{{ end }}
{{ if $v.Evidences }}
{{ range $v.Evidences }}
{{ $pull := index $evidencePulls . }}
{{ $issue := index $evidenceIssues . }}
{{ if $pull }}
{{ template "user/fragments/pullEvent" $pull }}
{{ else if $issue }}
{{ template "user/fragments/issueEvent" $issue }}
{{ end }}
{{ end }}