{{ define "star" }}
{{/*
Star component - displays star icon with count
Required: .IsStarred (bool), .StarCount (int)
Optional: .Interactive (bool), .Handle (string), .Repository (string)
Interactive mode: renders as button with HTMX toggle
Display mode: renders as span (default)
*/}}
{{ if .Interactive }}
{{ if .IsAuthenticated }}
{{ else }}
{{/* Anon viewer: link to login so the click isn't an abrupt 401 redirect. */}}
{{ .StarCount }}
{{ end }}
{{ else }}
{{ .StarCount }}
stars
{{ end }}
{{ end }}