UI/HQ/HQMenu.razor
@inherits PanelComponent
@namespace PlanetMeat

<root>
	@{
		var intro = ShowIntro;
		if (!intro || IntroScreen.FadeStarted)
		{
			var nav = Navigator;
			if (!HqDeciding.IsFreshStart)
			{
				<div class="navigation">
					<ViewButton View=@(HqNavigator.Views.Research)></ViewButton>
					<ViewButton View=@(HqNavigator.Views.Improve)></ViewButton>
					<ViewButton View=@(HqNavigator.Views.Mission)></ViewButton>
				</div>
				<WalletContents Currencies=@DisplayedCurrencies></WalletContents>
			}

			if (HqNavigator.ShopVisible)
			{
				<HQShop></HQShop>
			}
			if (HqNavigator.MissionVisible)
			{
				<ArenaLauncher></ArenaLauncher>
			}
			if (HqNavigator.ExplainerVisible)
			{
				<ViewExplainer></ViewExplainer>
			}
			if (HqNavigator.StatsVisible)
			{
				<CampaignStatsReadout></CampaignStatsReadout>
			}
		}

		if (intro)
		{
			<IntroScreen></IntroScreen>
		}

		if (Travelling)
		{
			<div class="travel-curtain"></div>
		}
	}
</root>

@code
{
	private DelayedRelocate Relocator => field ??= HqNavigator.Local?.Relocator;
	private bool Travelling => Relocator?.Travelling ?? false;

	private readonly List<string> DisplayedCurrencies = ["meat"];

	private HqNavigator Navigator => HqNavigator.Local;
	private bool ShowIntro => IntroScreen.ShowIntro && HqDeciding.ShowIntro;

	protected override int BuildHash() => System.HashCode.Combine(
		HqNavigator.View,
		ShowIntro,
		IntroScreen.FadeStarted,
		Travelling
	);
}