<?xml version="1.0" encoding="utf-8" ?>
<local:SeasonCardPresenter
    x:Class="BiliCopilot.UI.Controls.Components.FavoriteSeasonPresenter"
    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:local="using:BiliCopilot.UI.Controls.Components"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <local:PgcCoverImage
            CornerRadius="{StaticResource ControlCornerRadius}"
            Source="{x:Bind ViewModel.Cover, Mode=OneWay}"
            ToolTipService.ToolTip="{x:Bind ViewModel.Title, Mode=OneWay}" />
        <StackPanel
            Padding="12,8"
            VerticalAlignment="Bottom"
            Spacing="8">
            <base:TrimTextBlock
                FontWeight="Bold"
                Foreground="White"
                MaxLines="1"
                Text="{x:Bind ViewModel.Title, Mode=OneWay}" />
            <Border
                Padding="8,4"
                HorizontalAlignment="Left"
                CornerRadius="{StaticResource ControlCornerRadius}"
                Visibility="{x:Bind ViewModel.Subtitle, Converter={StaticResource ObjectToVisibilityConverter}, Mode=OneWay}">
                <Border.Background>
                    <SolidColorBrush Opacity="0.24" Color="Black" />
                </Border.Background>
                <base:TrimTextBlock
                    FontSize="12"
                    Foreground="White"
                    MaxLines="1"
                    Text="{x:Bind ViewModel.Subtitle, Mode=OneWay}" />
            </Border>
        </StackPanel>
        <Border
            Margin="8"
            Padding="8,4"
            HorizontalAlignment="Right"
            VerticalAlignment="Top"
            Background="{ThemeResource AccentFillColorTertiaryBrush}"
            CornerRadius="{StaticResource ControlCornerRadius}"
            Visibility="{x:Bind ViewModel.Highlight, Converter={StaticResource ObjectToVisibilityConverter}, Mode=OneWay}">
            <TextBlock
                Foreground="{ThemeResource TextOnAccentFillColorPrimaryBrush}"
                Style="{StaticResource CaptionTextBlockStyle}"
                Text="{x:Bind ViewModel.Highlight, Mode=OneWay}" />
        </Border>
    </Grid>
</local:SeasonCardPresenter>
