<?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.StoredRecipeView"
             xmlns:views="clr-namespace:ShoopNCook.Views">

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

        <Grid
            BackgroundColor="{StaticResource BackgroundSecondary}"
            Padding="10"
            MinimumHeightRequest="250"
            MinimumWidthRequest="150"
            RowDefinitions="*, Auto">

            <Grid.GestureRecognizers>
                <TapGestureRecognizer Tapped="OnRecipeTapped"/>
            </Grid.GestureRecognizers>

            <Border
                Grid.Row="0"
                Stroke="Transparent"
                StrokeShape="RoundRectangle 20"
                MaximumHeightRequest="300"
                BackgroundColor="{StaticResource ImageBackground}">
                <Grid>
                    <Image x:Name="RecipeImage"
                           Aspect="AspectFill"/>
                    <HorizontalStackLayout
                        x:Name="Stars"
                        VerticalOptions="End"
                        HorizontalOptions="End"
                        Margin="0, 0, 15, 2">
                        <Image
                            WidthRequest="15"
                            Source="star_full.svg"/>
                        <Image
                            WidthRequest="15"
                            Source="star_full.svg"/>
                        <Image
                            WidthRequest="15"
                            Source="star_full.svg"/>
                        <Image
                            WidthRequest="15"
                            Source="star_full.svg"/>
                        <Image
                            WidthRequest="15"
                            Source="star_full.svg"/>
                    </HorizontalStackLayout>
                </Grid>
            </Border>

            <VerticalStackLayout
                HorizontalOptions="Start"
                Grid.Row="1">
                <Label
                    TextColor="{StaticResource TextColorPrimary}"
                    x:Name="TitleLabel"/>
                <views:CounterView 
                    CounterText="pers"
                    x:Name="Counter"/>
            </VerticalStackLayout>
        </Grid>
    </Border>
</ContentView>
