<?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="Linaris.AddPlaylistPage"
             Title="AddPlaylistPage">
    <VerticalStackLayout BackgroundColor="#404040">
        <Frame Margin="10" CornerRadius="75" HeightRequest="150" WidthRequest="150" IsClippedToBounds="True" HorizontalOptions="Center" VerticalOptions="Center">
            <Image Source="{Binding ImageURL}" Aspect="AspectFill" WidthRequest="150" HeightRequest="150" Margin="-20" IsAnimationPlaying="True">
                <Image.GestureRecognizers>
                    <TapGestureRecognizer Tapped="ChangeImage"/>
                </Image.GestureRecognizers>
            </Image>
        </Frame>
        <Entry Text="{Binding Name}" WidthRequest="300" Placeholder="Nom de la playlist" TextColor="White" Margin="0,20,0,20" VerticalOptions="Center" HorizontalOptions="Center"/>
        <Entry Text="{Binding Description}" WidthRequest="300" HeightRequest="150" Placeholder="Description de la playlist" VerticalTextAlignment="Start" TextColor="White" Margin="0,20,0,20" VerticalOptions="Center" HorizontalOptions="Center"/>
        <HorizontalStackLayout HorizontalOptions="Center" Margin="10" Spacing="15">
            <Button Text="Créer la playlist" BackgroundColor="green" FontSize="20" Clicked="AddPlaylist"/>
            <Button Text="Annuler" BackgroundColor="red" FontSize="20" Clicked="Cancel"/>
        </HorizontalStackLayout>
    </VerticalStackLayout>
</ContentPage>