<?xml version="1.0" encoding="utf-8" ?>
<local:PgcPlayerPageControlBase
    x:Class="BiliCopilot.UI.Controls.Player.PgcOperationControl"
    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: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">

    <StackPanel Spacing="20">
        <StackPanel Orientation="Horizontal" Spacing="16">
            <local:LikeButton
                Command="{x:Bind ViewModel.ToggleLikeCommand, Mode=OneWay}"
                IsLiked="{x:Bind ViewModel.IsLiked, Mode=OneWay}"
                Tip="{x:Bind ViewModel.LikeCount, Mode=OneWay, Converter={StaticResource CountConverter}}"
                TripleCommand="{x:Bind ViewModel.TripleCommand, Mode=OneWay}" />
            <local:CoinButton
                AlsoLike="{x:Bind ViewModel.IsCoinAlsoLike, Mode=TwoWay}"
                Command="{x:Bind ViewModel.CoinCommand, Mode=OneWay}"
                IsCoined="{x:Bind ViewModel.IsCoined, Mode=OneWay}"
                Tip="{x:Bind ViewModel.CoinCount, Mode=OneWay, Converter={StaticResource CountConverter}}" />
            <local:FavoriteButton
                Command="{x:Bind ViewModel.FavoriteCommand, Mode=OneWay}"
                InitializeCommand="{x:Bind ViewModel.InitializeFavoritesCommand}"
                IsFavorited="{x:Bind ViewModel.IsFavorited, Mode=OneWay}"
                ItemsSource="{x:Bind ViewModel.FavoriteFolders, Mode=OneWay}"
                Tip="{x:Bind ViewModel.FavoriteCount, Mode=OneWay, Converter={StaticResource CountConverter}}" />
        </StackPanel>
        <Button
            Padding="16,8"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Center"
            Command="{x:Bind ViewModel.ToggleFollowCommand, Mode=OneWay}">
            <StackPanel Orientation="Horizontal" Spacing="8">
                <ic:SymbolIcon
                    VerticalAlignment="Center"
                    FontSize="14"
                    IconVariant="{x:Bind ViewModel.IsFollow, Mode=OneWay, Converter={StaticResource BoolToIconVariantConverter}}"
                    Symbol="Heart" />
                <Grid VerticalAlignment="Center">
                    <TextBlock Text="{ext:Locale Name=Follow}" Visibility="{x:Bind ViewModel.IsFollow, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}" />
                    <TextBlock Text="{ext:Locale Name=Followed}" Visibility="{x:Bind ViewModel.IsFollow, Mode=OneWay}" />
                </Grid>
            </StackPanel>
        </Button>
        <local:DownloadButton ViewModel="{x:Bind ViewModel.Downloader, Mode=OneWay}" />
        <StackPanel Spacing="4">
            <TextBlock
                HorizontalAlignment="Left"
                FontSize="12"
                IsTextSelectionEnabled="True">
                <Run Text="SS" />
                <Run FontWeight="Bold" Text="{x:Bind ViewModel.SeasonId, Mode=OneWay}" />
            </TextBlock>
            <TextBlock
                HorizontalAlignment="Left"
                FontSize="12"
                IsTextSelectionEnabled="True">
                <Run Text="EP" />
                <Run FontWeight="Bold" Text="{x:Bind ViewModel.EpisodeId, Mode=OneWay}" />
            </TextBlock>
        </StackPanel>
    </StackPanel>
</local:PgcPlayerPageControlBase>
