@if (Rating is not IRatingOverallResponse overallRating || overallRating.Count > 0 || EmptyMode == DisplayRatingComponentEmptyMode.DoubleDash)
{
@switch (Rating)
{
case RatingUserResponse userRating:
@($"{userRating.Rating}/10")
break;
case IRatingOverallResponse { Count: > 0 } overallResponse:
@($"{Math.Round(overallResponse.Rating!.Value, 2)}/10")
@(overallResponse.Count)
break;
default:
@switch (EmptyMode)
{
case DisplayRatingComponentEmptyMode.NoRatings: @("no ratings"); break;
case DisplayRatingComponentEmptyMode.DoubleDash: @("--/10"); break;
}
break;
}