UI/MedalIcon.razor
@using Sandbox.UI
@inherits Panel
@namespace BlockParty
@attribute [StyleSheet( "MedalIcon.razor.scss" )]

<root class=@MedalName style=@IconStyle onmouseover=@OnHover></root>

@code
{
	[Parameter] public System.Action<PanelEvent> OnHover { get; set; }
	[Parameter] public int Place { get; set; }
	[Parameter] public int Size { get; set; } = 32;
	private string MedalName => Place switch { 1 => "gold", 2 => "silver", 3 => "bronze", _ => "" };
	private string IconStyle => $"width:{Size}px;height:{Size}px;";
	protected override int BuildHash() => System.HashCode.Combine( Place, Size );
}