<?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"
             xmlns:local="clr-namespace:MangaMap"
             x:Class="MangaMap.Views.ficheAnime"
             Title="ficheAnime"
             BackgroundColor="{StaticResource Secondary}">

    <Grid RowDefinitions="40, *">
        <local:NewContent1 HeightRequest="40" VerticalOptions="Start" Padding="10, 0"/>

        <VerticalStackLayout Grid.Row="1">

            <HorizontalStackLayout>

                <ImageButton
                    Style="{StaticResource ImageAnime}"
                    BackgroundColor="Orange"
                    Margin="50"
                    Source="{Binding AnimeModel.Affiche}"
                    />

                <Label Text="{Binding AnimeModel.Nom}" FontSize="Header" VerticalOptions="Center" TextColor="White"/>

            </HorizontalStackLayout>

            <Grid x:Name="stars" ColumnDefinitions="80,80,80,80,80"/>

            <HorizontalStackLayout>
                <Button Text="Ajouter à la liste"
                        TextColor="#FFFFFF"
                        HorizontalOptions="Start"
                        Margin="20"
                        BackgroundColor="{StaticResource Primary}"
                        Clicked="AjouterListe"/>

                <Entry x:Name="nombreEP" Placeholder="Nombre d'épisodes vu" Margin="10,10,10,10" HeightRequest="20" WidthRequest="180" PlaceholderColor="White" TextColor="White"/>
                <Label Text="{Binding AnimeModel.NbEpisodes, StringFormat='/ {0}'}" FontSize="Medium" VerticalOptions="Center"/>
                <ImageButton Source="ok.png" Margin="20,0,0,0" HeightRequest="20" Clicked="NbEpCheck"/>
            </HorizontalStackLayout>

            <Label Text="{Binding AnimeModel.Type}" FontSize="Large"  TextColor="White" Margin="20,0,0,0"/>
            <Label Text="{Binding AnimeModel.Description}" Margin="20,0,0,0"/>

            <Button Text="Supprimer de la liste"
                        TextColor="#FFFFFF"
                        HorizontalOptions="End"
                        Margin="20"
                        BackgroundColor="Red"
                        Clicked="SupprimerListe"/>

        </VerticalStackLayout>

    </Grid>

</ContentPage>