<?xml version="1.0" encoding="utf-8" ?>
<base:LayoutUserControlBase
    x:Class="BiliCopilot.UI.Controls.Player.LikeButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:base="using:Richasy.WinUIKernel.Share.Base"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="using:BiliCopilot.UI.Extensions"
    xmlns:ic="using:FluentIcons.WinUI"
    xmlns:local="using:BiliCopilot.UI.Controls.Player"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <StackPanel Spacing="8">
            <ToggleButton
                x:Name="Btn"
                Width="48"
                Height="48"
                Padding="0"
                HorizontalAlignment="Center"
                HorizontalContentAlignment="Center"
                VerticalContentAlignment="Center"
                Click="OnLikeButtonClick"
                Command="{x:Bind Command, Mode=OneWay}"
                CornerRadius="24"
                IsChecked="{x:Bind IsLiked, Mode=OneWay}"
                ToolTipService.ToolTip="{ext:Locale Name=Like}">
                <ic:SymbolIcon
                    FontSize="16"
                    IconVariant="{x:Bind IsLiked, Mode=OneWay, Converter={StaticResource BoolToIconVariantConverter}}"
                    Symbol="ThumbLike" />
            </ToggleButton>
            <TextBlock
                HorizontalAlignment="Center"
                Style="{StaticResource CaptionTextBlockStyle}"
                Text="{x:Bind Tip, Mode=OneWay}" />
        </StackPanel>
        <TeachingTip
            x:Name="TripleTip"
            ActionButtonClick="OnTripleButtonClick"
            ActionButtonCommand="{x:Bind TripleCommand, Mode=OneWay}"
            ActionButtonContent="{ext:Locale Name=Triple}"
            IsLightDismissEnabled="True"
            PreferredPlacement="Top"
            ShouldConstrainToRootBounds="False"
            Subtitle="{ext:Locale Name=TripleTip}"
            Target="{x:Bind Btn}" />
    </Grid>
</base:LayoutUserControlBase>
