Ui/PrivatePlan.razor

A Razor component defining a UI element. It conditionally displays a button related to a selected contract in the City state.

@namespace CitySim
@using CitySim.DesignSystem
@using CitySim.Match
@using CitySim.Punchboard
@inherits MatchPanel
<root class="private-plan">
 @if (City.OwnContract?.Selected is { } id) {
  <PlotterButton Text=@(GameText.Plain($"🔒 {Contracts.Get(id).Name}")) Size=@(PbSize.Small) Kind=@(PbButtonKind.Ghost) Clicked=@(() => City.ToggleGoals()) />
 }
</root>