{{define "validation_results"}}
{{if .Valid}}
<div class="flex items-center text-green-600 mb-4">
  <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
  </svg>
  Package is valid
</div>
{{else}}
<div class="flex items-center text-red-600 mb-4">
  <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z"/>
  </svg>
  Package validation failed
</div>
{{end}}

{{if .Flags}}
<div class="space-y-3">
  {{range .Flags}}
  <div class="flex items-start p-3 rounded-lg {{if eq .Severity "critical"}}bg-red-50 border border-red-200{{else if eq .Severity "warning"}}bg-yellow-50 border border-yellow-200{{else}}bg-blue-50 border border-blue-200{{end}}">
    <span class="px-2 py-0.5 text-xs font-medium rounded {{if eq .Severity "critical"}}bg-red-100 text-red-800{{else if eq .Severity "warning"}}bg-yellow-100 text-yellow-800{{else}}bg-blue-100 text-blue-800{{end}}">
      {{.Severity}}
    </span>
    <div class="ml-3">
      <p class="text-sm font-medium text-gray-900">{{.Reason}}</p>
      {{if .File}}
      <p class="text-xs text-gray-500 mt-1">{{.File}}{{if .Line}}:{{.Line}}{{end}}</p>
      {{end}}
    </div>
  </div>
  {{end}}
</div>
{{else}}
<p class="text-sm text-gray-500">No issues found.</p>
{{end}}

{{if .AutoApprovable}}
<div class="mt-4 pt-4 border-t border-gray-200">
  <p class="text-sm text-green-600">Package is auto-approvable</p>
</div>
{{end}}
{{end}}
