<?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="GMCabsDriverAssistantSolution.Views.AcceptBookingProcessPage"
             xmlns:vm="clr-namespace:GMCabsDriverAssistantSolution.ViewModels"
             xmlns:custom="clr-namespace:GMCabsDriverAssistantSolution.CustomControls"
             Title="{Binding Title}">
    <ContentPage.BindingContext>
        <vm:AcceptBookingProcessPageModel/>
    </ContentPage.BindingContext>
    <ContentPage.Content>
        <StackLayout BackgroundColor="#DCDCDC">

            <StackLayout
                IsVisible="{Binding IsProcessing}"
                VerticalOptions="CenterAndExpand">
                <Label Text="Processing"
                       TextColor="Black"
                       FontSize="25"
                       HorizontalTextAlignment="Center"
                       HorizontalOptions="CenterAndExpand" />
                <Label Text="Please Wait"
                       TextColor="Black"
                       FontSize="24"
                       Margin="0,15,0,20"
                       HorizontalTextAlignment="Center"
                       HorizontalOptions="CenterAndExpand" />
                <ActivityIndicator IsRunning="true" />
            </StackLayout>
            <StackLayout IsVisible="{Binding IsBookingConfirmed}" Margin="0,0,0,0">
                <Label 
                    Text="Booking Awarded"
                    TextColor="Black"
                    FontSize="26"
                    Margin="0,90,0,0"
                    HorizontalTextAlignment="Center"
                    HorizontalOptions="CenterAndExpand" />
                <Image
                    Source="righttic.png"
                    HeightRequest="100"/>
                <Label 
                    Text="Head to"
                    TextColor="Black"
                    FontSize="20"
                    HorizontalTextAlignment="Center"
                    HorizontalOptions="CenterAndExpand" />
                <Label 
                    Text="Please confirm on terminal ASAP to keep this booking"
                    TextColor="Black"
                    Margin="40,0,40,0"
                    FontSize="26"
                    HorizontalTextAlignment="Center"
                    HorizontalOptions="CenterAndExpand"/>
                <Label 
                    Text="3.00"
                    TextColor="Black"
                    FontAttributes="Bold"
                    Margin="0,20,0,0"
                    FontSize="30"
                    HorizontalOptions="CenterAndExpand"/>
                <Label 
                    Text="Before Automatic Cancellation"
                    TextColor="Black"
                    FontSize="20"
                     Margin="0,20,0,0"
                    HorizontalOptions="CenterAndExpand" />
            </StackLayout>
            <StackLayout VerticalOptions="End"
                    IsVisible="{Binding IsBookingConfirmed}">
                <Button CornerRadius="30"
                    VerticalOptions="EndAndExpand"
                    Margin="40,0,40,0"
                    Text="OK"
                    FontSize="20"
                    />
            </StackLayout>
            <StackLayout 
                    IsVisible="{Binding IsBookingUnavailable}">
                <Label 
                    Text="Booking Unavailable"
                    TextColor="Black"
                    FontAttributes="Bold"
                    FontSize="24"
                    Margin="40,100,40,0"
                    HorizontalTextAlignment="Center"
                    HorizontalOptions="CenterAndExpand" />

                <Label 
                    Text="This booking is no longer available"
                    HorizontalTextAlignment="Center"
                    TextColor="Black"
                    Margin="40,60,40,0"
                    FontSize="25"/>


                <Button CornerRadius="30"
                    VerticalOptions="EndAndExpand"
                    Margin="40,140,40,0"
                    Text="OK"
                    FontSize="20"
                    />
            </StackLayout>

        </StackLayout>

    </ContentPage.Content>
</ContentPage>