<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:ZicMoove;assembly=ZicMoove"
             xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps.dll"
             x:Class="ZicMoove.Pages.BookQueryPage"
             Style ="{StaticResource PageStyle}"
             >
  <ContentPage.Resources>
    <ResourceDictionary>
      <Style TargetType="Label">
        <Setter Property="Style" Value="{StaticResource ContentLabelStyle}" />
      </Style>
      <Style TargetType="Button">
        <Setter Property="Style" Value="{StaticResource ButtonStyle}" />
      </Style>
    </ResourceDictionary>
  </ContentPage.Resources>

  <StackLayout x:Name="bookQueryLayout">
    <StackLayout Orientation="Vertical">
    <Image Source="{Binding Avatar}" Aspect="AspectFit" VisualElement.HeightRequest="{StaticResource BigUserAvatarSize}"/>
    <Label Text="{Binding Client.UserName}" />
    <Label Text="{Binding EventDate, StringFormat='le {0:dddd d MMMM yyyy à hh:mm}'}"  />
    <Label Text="{Binding Data.Reason}" />
    <Label Text="{Binding Location.Address}" />
    <Label Text="{Binding Previsional}" />
    </StackLayout>
    <StackLayout Orientation="Vertical"  HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" >
    <maps:Map x:Name="map" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand"></maps:Map>
    
      <StackLayout Orientation="Horizontal">
        <StackLayout Orientation="Vertical">
        <Button Text="{Binding EditEstimateButtonText}" Clicked="OnEditEstimate" />
        <Button Text="{x:Static local:Strings.DeclineQuery}" Clicked="OnDropQuery" />
        </StackLayout>
        <StackLayout Orientation="Vertical">

        <Button Text="{x:Static local:Strings.BlockThisUser}" Clicked="OnBlockThisUser" />
        <Button Text="{x:Static local:Strings.ViewEstimate}" 
                BorderRadius="50" BorderWidth="2" BorderColor="Aqua" x:Name ="btn"
                VisualElement.IsVisible="{Binding EstimationDone}"
                Clicked="OnViewEstimate" Image="exclam.png" />
        </StackLayout>
      </StackLayout>

    </StackLayout>
  </StackLayout>
</ContentPage>