UI/HUD/Elements/DefenseFailedPopup.razor
@using Sandbox.UI;
@inherits Panel
@namespace PlanetMeat

<root>
	<div class="pm-title">@FailedTitle</div>
	<div class="choices">
		<button class="click-active" onclick=@RelocateToHq>
			<span>#button.failed.next</span>
		</button>
	</div>
</root>

@code
{
	private int RoundNum => Agenda.Current.RoundNum;
	private string FailedTitle => Game.Language.GetPhrase(
		"failed.popup.title",
		new() { ["round"] = RoundNum }
	);

	private void RelocateToHq() => Agenda.Current.RelocateToHq();

	protected override int BuildHash() => System.HashCode.Combine(
		RoundNum
	);
}