Ui/PlacementOutlookPanel.razor

This Blazor component handles the UI logic for an outlook placement view. It renders the placement outlook view conditional on player state and subscribes to player preview changes for dynamic updates.

@namespace CitySim
@using CitySim.Match
@using CitySim.Punchboard
@inherits MatchPanel

<root class="placement-outlook">
 @if(City.Player.Outlook is { } outlook && City.Player.HoveredValid) {
  <PlacementOutlookView Outlook=@outlook Card=@(City.RenovationReplacement ?? City.SelectedCard) [email protected] [email protected] />
 }
</root>

@code {
 protected override void Subscribe() {if(City?.Player!=null) City.Player.PreviewChanged+=Refresh;}
 protected override void Unsubscribe() {if(City?.Player!=null) City.Player.PreviewChanged-=Refresh;}
}