exciting-aftermath/Portfolio.WebUI.Server/Components/Pages/Pokemon Pages/PokemonRate.razor

57 lines
1.6 KiB
Plaintext

@page "/rate-pokemon"
@inject IPokemonService PokemonService
@inject IPokemonNatureService PokemonNatureService
@inject IPokemonSubskillService PokemonSubskillService
@attribute [StreamRendering]
@rendermode InteractiveServer
<PageTitle>Rate Pokémon</PageTitle>
<PokemonHeader />
@if (PokemonList == null || NatureList == null || SubskillList == null)
{
<Loading />
}
else
{
<div class="mt-4">
<div class="row">
<!-- Left Panel: Selector -->
<div class="col-md-4">
<PokemonSelector
PokemonList="PokemonList"
SelectedPokemon="SelectedPokemon"
OnPokemonSelected="SelectPokemon" />
</div>
<!-- Center Panel: Pokemon View -->
<div class="col">
@if (SelectedPokemon != null)
{
<PokemonCard Pokemon="SelectedPokemon" />
}
else
{
<p class="text-muted">Please select a Pokémon to rate.</p>
}
</div>
@if (SelectedPokemon != null)
{
<!-- Right Panel: Rating View -->
<div class="col-md-4 col-4">
<PokemonRatingPanel
PokemonToRate="SelectedPokemon"
NatureList="NatureList"
SubskillList="SubskillList"
/>
</div>
}
</div>
</div>
}