<?xml version="1.0" encoding="UTF-8"?>
<Grid xmlns="http://xamarin.com/schemas/2014/forms" 
      xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
      x:Class="PhilExample.UI.Views.InsertionMiniView"
      xmlns:vms="clr-namespace:PhilExample.VMs"
      xmlns:ffimg="clr-namespace:FFImageLoading.Svg.Forms;assembly=FFImageLoading.Svg.Forms"
      RowSpacing="0" ColumnSpacing="0"
      Padding="0,4,0,4"
      x:DataType="vms:InsertionMiniVM">

    <Grid.RowDefinitions>
        <RowDefinition Height="auto" />
        <RowDefinition Height="auto" />
        <RowDefinition Height="auto" />
        <RowDefinition Height="auto" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="40"/>
    </Grid.ColumnDefinitions>

    <BoxView Grid.RowSpan="4" Grid.ColumnSpan="2"
             BackgroundColor="{StaticResource Color_Primary}"
             Opacity="0.08"
             CornerRadius="15"/>

    <Label Grid.Row="0" Text="{Binding Title}" FontSize="16" TextColor="{StaticResource Color_Text2}" FontFamily="NunitoBold"
           Margin="10,10,4,0" LineBreakMode="TailTruncation"/>
    <Label Grid.Row="1" Text="{Binding DateText}" FontSize="10" TextColor="{StaticResource Color_Text3}" FontFamily="NunitoMedium"
           Margin="10,0,4,0"/>
    <Label Grid.Row="2" Text="{Binding LocationText}" FontSize="10" TextColor="{StaticResource Color_Text3}" FontFamily="NunitoMedium" 
           Margin="10,0,4,0"/>
    <Label Grid.Row="3" Text="{Binding PriceText}" FontSize="20" TextColor="{StaticResource Color_Primary}" FontFamily="NunitoExtraBold" 
           VerticalOptions="End"
           Margin="10,6,4,10" />

    <ffimg:SvgCachedImage Grid.RowSpan="4" Grid.Column="1"
                          HorizontalOptions="Center" VerticalOptions="Center"
                          HeightRequest="16"
                          CacheType="All"
                          Source="resource://PhilExample.Resources.Images.arrow-right.svg" />

    <Grid.GestureRecognizers>
        <TapGestureRecognizer Command="{Binding ActionCommand}" CommandParameter="{Binding ActionCommandParameter}" />
    </Grid.GestureRecognizers>
</Grid>