<?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="ShoopNCook.Pages.ConfirmMail"
             Title="ConfirmMail"
             BackgroundColor="{StaticResource BackgroundPrimary}">
    <ScrollView>
        <Grid
            Padding="20"
            RowDefinitions="Auto, Auto, Auto, *">

            <!-- Profile label and return button -->
            <Grid
                Grid.Row="0"
                RowDefinitions="Auto, *"
                ColumnDefinitions="*, 1.5*"
                Margin="0, 0, 0, 40">
                <HorizontalStackLayout>
                    <ImageButton 
                        Grid.Column="0" 
           
                        HeightRequest="50"
                        WidthRequest="50"
                        Source="arrow_back.svg"
                        Clicked="OnBackButtonClicked"/>
                </HorizontalStackLayout>
                <Label 
                    Margin="-40,10,0,0"
                    Grid.Column="1"
                    FontSize="24"
                    TextColor="{StaticResource TextColorPrimary}"
                    Text="Confirm Email"
                    FontFamily="PoppinsBold"
                    VerticalOptions="Start"/>
            </Grid>

            <!-- Email entry -->
            <Grid
                Grid.Row="1"
                RowDefinitions="*, Auto, Auto"
                >

                <Label 
                    
                    Grid.Row="0"
                    FontSize="15"
                    TextColor="{StaticResource TextColorSecondary}"
                    Text="The following email address is yours ?"
                    FontFamily="PoppinsBold"
                    VerticalOptions="Center"/>
                <Border
                    Grid.Row="1"
                    Style="{StaticResource SecondaryBorder}"
                    Margin="0,30,0,20">
                    <Grid
                        Padding="5"
                        BackgroundColor="{StaticResource BackgroundSecondary}"
                        ColumnDefinitions="Auto,Auto,*">

                        <Image 
                            Grid.Column="1"
                            Source="email_icon.svg">
                        </Image>
                        <Entry 
                            Style="{StaticResource UserInput}"
                            Grid.Column="2"
                            Text="%Profile_Mail%"></Entry>
                    </Grid>
                </Border>

                <VerticalStackLayout
                    Grid.Row="2"
                    VerticalOptions="End">
                    <Border
                        Margin="0, 30, 0, 0"
                        Stroke="{StaticResource BackgroundPrimary}"
                        StrokeShape="RoundRectangle 12">
                        <Button
                            BackgroundColor="{StaticResource ActionButton}"
                            FontFamily="PoppinsMedium"
                            TextColor="White"
                            Text="That's been my email"
                            />
                    </Border>
                </VerticalStackLayout>
            </Grid>
            <Grid>

            </Grid>
            <!-- Sendmail grid -->
            <Grid
                Grid.Row="2"
                RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto"
                RowSpacing="10">
                <Label 
                    Grid.Row="0"
                    Margin="20"
                    Text="A recuperation code get send to your email address. Type it here to confirm your email. "
                    FontFamily="PoppinsBold"
                    TextColor="LightGreen"/>
                <Label 
                    Grid.Row="1"
                    Text="Enter the code here"
                    FontFamily="PoppinsBold"
                    TextColor="{StaticResource TextColorSecondary}"/>
                <Border
                    Grid.Row="2"
                    Style="{StaticResource SecondaryBorder}"
                    >
                    <Grid
                        Padding="5"
                        BackgroundColor="{StaticResource BackgroundSecondary}"
                        ColumnDefinitions="Auto,Auto,*">

                        <Image 
                            Grid.Column="1"
                            Source="code.png">
                        </Image>
                        <Entry 
                            Style="{StaticResource UserInput}"
                            Grid.Column="2"
                            Placeholder="Code"/>
                    </Grid>
                </Border>
             
            </Grid>

            <!-- Confirm button -->

            <VerticalStackLayout
                Grid.Row="3"
                VerticalOptions="End">
                <Border
                    Margin="0, 30, 0, 0"
                    Stroke="{StaticResource BackgroundPrimary}"
                    StrokeShape="RoundRectangle 12">
                    <Button
                        BackgroundColor="{StaticResource ActionButton}"
                        FontFamily="PoppinsMedium"
                        TextColor="White"
                        Text="Confirm my email"
                        Clicked="OnRegiterButtonTapped"/>
                </Border>
            </VerticalStackLayout>


        </Grid>

    </ScrollView>
</ContentPage>