<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="ShoopNCook.Views.RecipeView"
             Margin="4,2">


    <Border
        Style="{StaticResource SecondaryBorderShadow}"
        StrokeShape="RoundRectangle 30">

        <Grid
            BackgroundColor="{StaticResource BackgroundSecondary}"
            Padding="10"
            MinimumHeightRequest="175"
            MaximumHeightRequest="175"
            MinimumWidthRequest="150"
            MaximumWidthRequest="150"
            RowDefinitions="*, Auto">
            
            <Grid.GestureRecognizers>
                <TapGestureRecognizer Tapped="OnRecipeTapped"/>
            </Grid.GestureRecognizers>
            <Border
                Grid.Row="0"
                Stroke="Transparent"
                StrokeShape="RoundRectangle 20"
                BackgroundColor="{StaticResource ImageBackground}">
                <Grid>
                    <Image x:Name="RecipeImage"
                           Aspect="AspectFill"
                           MinimumHeightRequest="155"
                           MinimumWidthRequest="130"
                           MaximumHeightRequest="155"
                           MaximumWidthRequest="130"/>
                    <HorizontalStackLayout
                        x:Name="Stars"
                        VerticalOptions="End"
                        HorizontalOptions="End"
                        Margin="0, 0, 15, 2">
                        <Image
                            WidthRequest="10"
                            Source="star_full.svg"/>
                        <Image
                            WidthRequest="10"
                            Source="star_full.svg"/>
                        <Image
                            WidthRequest="10"
                            Source="star_full.svg"/>
                        <Image
                            WidthRequest="10"
                            Source="star_full.svg"/>
                        <Image
                            WidthRequest="10"
                            Source="star_full.svg"/>
                    </HorizontalStackLayout>
                </Grid>
            </Border>

            <VerticalStackLayout Grid.Row="1">
                <Label
                    TextColor="{StaticResource TextColorPrimary}"
                    x:Name="TitleLabel"/>
                <Label
                    TextColor="{StaticResource TextColorSecondary}"
                    x:Name="SubtitleLabel"/>
            </VerticalStackLayout>
        </Grid>
    </Border>

</ContentView>
