@using WotBlitzStatisticsPro.Blazor.Helpers @using MediatR @using WotBlitzStatisticsPro.Blazor.Messages @inject IStringLocalizer Localize; @inject IMediator Mediator
@Localize["Battles"]: @AccountInfo.Battles.ToString("N0")
@Localize["Win rate"]: @AccountInfo.WinRate.ToString("N2")%
@Localize["Wn7"]: @AccountInfo.Wn7.ToString("N2")
@Localize["Average XP"]: @AccountInfo.AvgXp.ToString("N0")
@Localize["Average Damage"]: @AccountInfo.AvgDamage.ToString("N0")
@Localize["Damage coefficient"]: @AccountInfo.DamageCoefficient.ToString("N2")
@Localize["Survival rate"]: @AccountInfo.SurvivalRate.ToString("N0")%
@Localize["Avg tier"]: @AccountInfo.AvgTier.ToString("N2")

@Localize["Most effective tank"]

@if (MostRelevantTank != null) { }

@Localize["Tank with Max XP"] (@AccountInfo.MaxXp.ToString("N0"))

@if (MaxXpTank != null) { }

@Localize["Tank with Max frags"] (@AccountInfo.MaxFrags)

@if (MaxFragsTank != null) { }
@code { [Parameter] public IAccount AccountInfo { get; set; } public ITank? MostRelevantTank; public ITank? MaxXpTank; public ITank? MaxFragsTank; protected override void OnInitialized() { MostRelevantTank = AccountInfo?.Tanks?.FindMostRelevantTank(); MaxXpTank = AccountInfo?.Tanks?.FirstOrDefault(t => t.TankId == AccountInfo.MaxXpTankId); MaxFragsTank = AccountInfo?.Tanks?.FirstOrDefault(t => t.TankId == AccountInfo.MaxFragsTankId); } }