<UserControl
    x:Class="Pixeval.Controls.HeartButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
    xmlns:local="using:Pixeval.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:winUi="using:FluentIcons.WinUI"
    Width="26"
    Height="26"
    Tapped="HeartButton_OnTapped"
    HorizontalAlignment="Center"
    VerticalAlignment="Center"
    mc:Ignorable="d">
    <Grid>
        <interactivity:Interaction.Behaviors>
            <interactivity:EventTriggerBehavior EventName="PointerEntered">
                <interactivity:ChangePropertyAction
                    PropertyName="Value"
                    TargetObject="{x:Bind Back}"
                    Value="1" />
            </interactivity:EventTriggerBehavior>
            <interactivity:EventTriggerBehavior EventName="PointerExited">
                <interactivity:ChangePropertyAction
                    PropertyName="Value"
                    TargetObject="{x:Bind Back}"
                    Value="0" />
            </interactivity:EventTriggerBehavior>
        </interactivity:Interaction.Behaviors>
        <local:WaveProgressHeart
            x:Name="Back"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            DurationSeconds="1"
            Opacity="0.5" />
        <local:WaveProgressHeart
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Value="{x:Bind Convert(State), Mode=OneWay}" />
        <winUi:SymbolIcon FontSize="22" Symbol="Heart" />
    </Grid>
</UserControl>
