{{ define "attestation-details" }} {{ if .Error }}

{{ .Error }}

{{ else }}

{{ len .Attestations }} {{ pluralize (len .Attestations) "attestation" "attestations" }} attached

{{ range .Attestations }}
{{/* "Unknown" / "Binary" etc. predicates shouldn't read as success-green. */}} {{ if or (eq .PredicateType "Unknown") (eq .PredicateType "Binary") }} {{ .PredicateType }} {{ else }} {{ .PredicateType }} {{ end }} {{ .Digest }}
{{ if .NeedsLogin }} {{ if $.LoginURL }}

Log in to view attestation content

{{ else }}

Log in to view attestation content

{{ end }} {{ else if .FetchError }}

{{ .FetchError }}

{{ else if .RawJSON }}
View content
{{ .RawJSON }}
{{ else if .Size }}

Binary content ({{ humanizeBytes .Size }}); cannot display inline

{{ end }}
{{ else }} {{ template "state-empty" (dict "Icon" "fingerprint" "Title" "No attestations attached" "Subtext" "Signed provenance or SBOM attestations will appear here once attached to this manifest." ) }} {{ end }}
{{ end }} {{ end }}