<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="LOLAPP.View.Main"
             Title="Main">
    <!-- Barre de navigation -->
    <!-- Image à gauche (redirection vers cette page) -->
    <!-- Bouton "Strat" à droite de l'image (redirection vers la page "strat") -->
    <!-- Bouton "Register" -->
    <!-- Bouton "Login" -->
    <ScrollView>
        <HorizontalStackLayout>
            <!-- Grille d'images avec fenêtres contextuelles -->
            <Grid HorizontalOptions="Start">
            <Grid.RowDefinitions>
                <RowDefinition Height="300" />
                <RowDefinition Height="300"/>
                </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="300" />
                <ColumnDefinition Width="300" />
                <ColumnDefinition Width="300" />
            </Grid.ColumnDefinitions>

            <Image Grid.Row="0" Grid.Column="0" Source="{Binding _champions[0].Image}"  >
                <Image.GestureRecognizers>
                    <TapGestureRecognizer Tapped="ImageTapped" />
                </Image.GestureRecognizers>
            </Image>
            <Image Grid.Row="0" Grid.Column="1" Source="{Binding _champions[1].Image}" >
                <Image.GestureRecognizers>
                    <TapGestureRecognizer Tapped="ImageTapped" />
                </Image.GestureRecognizers>
            </Image>
            <Image Grid.Row="0" Grid.Column="2" Source="{Binding _champions[2].Image}" >
                <Image.GestureRecognizers>
                    <TapGestureRecognizer Tapped="ImageTapped" />
                </Image.GestureRecognizers>
            </Image>
            <Image Grid.Row="1" Grid.Column="0" Source="{Binding _champions[3].Image}" >
                <Image.GestureRecognizers>
                    <TapGestureRecognizer Tapped="ImageTapped" />
                </Image.GestureRecognizers>
            </Image>
                <Image Grid.Row="1" Grid.Column="1" Source="{Binding _champions[4].Image}" >
                    <Image.GestureRecognizers>
                        <TapGestureRecognizer Tapped="ImageTapped" />
                    </Image.GestureRecognizers>
                </Image>
            </Grid>
        <!-- Ajoutez d'autres images pour les champions suivants -->
            <StackLayout WidthRequest="530" BackgroundColor="DarkGrey">
                <StackLayout HorizontalOptions="Center" VerticalOptions="Center">
                    <Label x:Name="championNameLabel" FontSize="20" HorizontalOptions="Center" />
                    <Label x:Name="championTitreLabel" FontSize="16" HorizontalOptions="Center" />
                    <Image x:Name="abilityimage1" Margin="1" HeightRequest="50" WidthRequest="50"/>
                    <Label x:Name="abilityname1" FontSize="17" HorizontalOptions="Center" />
                    <Label x:Name="abilitydesc1" FontSize="14" HorizontalOptions="Center" />
                    <Image x:Name="abilityimage2" Margin="1" HeightRequest="50" WidthRequest="50"/>
                    <Label x:Name="abilityname2" FontSize="17" HorizontalOptions="Center" />
                    <Label x:Name="abilitydesc2" FontSize="14" HorizontalOptions="Center" />
                    <Image x:Name="abilityimage3" Margin="1" HeightRequest="50" WidthRequest="50"/>
                    <Label x:Name="abilityname3" FontSize="17" HorizontalOptions="Center" />
                    <Label x:Name="abilitydesc3" FontSize="14" HorizontalOptions="Center" />
                    <Image x:Name="abilityimage4" Margin="1" HeightRequest="50" WidthRequest="50"/>
                    <Label x:Name="abilityname4" FontSize="17" HorizontalOptions="Center" />
                    <Label x:Name="abilitydesc4" FontSize="14" HorizontalOptions="Center" />
                    <Image x:Name="abilityimage5" Margin="1" HeightRequest="50" WidthRequest="50"/>
                    <Label x:Name="abilityname5" FontSize="17" HorizontalOptions="Center" />
                    <Label x:Name="abilitydesc5" FontSize="14" HorizontalOptions="Center" />
                </StackLayout>
            </StackLayout>
        </HorizontalStackLayout>
    </ScrollView>
</ContentPage>
