<?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.CounterView"
             x:Name="Counter">
    <Grid
        ColumnDefinitions="*, Auto, *">

        <Border
            Grid.Column="0"
            Stroke="Transparent"
            StrokeShape="RoundRectangle 100"
            BackgroundColor="{StaticResource Selected}">
            <ImageButton
                Source="minus.svg"
                WidthRequest="40"
                HeightRequest="40"
                Clicked="OnMinus"/>
        </Border>

        <HorizontalStackLayout
            Grid.Column="1"
            Spacing="3"
            Margin="10, 0, 10, 0">
            <Label 
                x:Name="CountLabel"
                Text="{Binding Count, Source={x:Reference Counter}}"
                TextColor="{StaticResource TextColorPrimary}"
                VerticalTextAlignment="Center"
                FontFamily="PoppinsMedium"/>

            <Label 
                x:Name="CounterLabel"
                Text="{Binding CounterText, Source={x:Reference Counter}}"
                TextColor="{StaticResource TextColorPrimary}"
                VerticalTextAlignment="Center"
                FontFamily="PoppinsMedium"/>
        </HorizontalStackLayout>

        <Border
            Grid.Column="2"
            Stroke="Transparent"
            StrokeShape="RoundRectangle 100"
            BackgroundColor="{StaticResource Selected}">
            <ImageButton 
                Source="plus.svg"
                WidthRequest="40"
                HeightRequest="40"
                Clicked="OnPlus"/>
        </Border>
    </Grid>
</ContentView>
