<local:PgcSeasonViewBase
    x:Class="Bili.App.Controls.Player.PgcSeasonView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:Bili.App.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:Bili.App.Controls.Player"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:video="using:Bili.ViewModels.Interfaces.Video"
    d:DesignHeight="300"
    d:DesignWidth="400"
    mc:Ignorable="d">

    <ScrollViewer
        HorizontalScrollMode="Disabled"
        VerticalScrollBarVisibility="Hidden"
        VerticalScrollMode="Auto">
        <controls:VerticalRepeaterView
            EnableDetectParentScrollViewer="False"
            HeaderVisibility="Collapsed"
            ItemOrientation="Vertical"
            ItemsSource="{x:Bind ViewModel.Seasons}"
            MinWideItemHeight="220"
            MinWideItemWidth="120">
            <controls:VerticalRepeaterView.ItemTemplate>
                <DataTemplate x:DataType="video:IVideoIdentifierSelectableViewModel">
                    <controls:CardPanel
                        Click="OnSeasonItemClickAsync"
                        DataContext="{x:Bind}"
                        IsChecked="{x:Bind IsSelected, Mode=OneWay}"
                        IsEnableCheck="True"
                        IsEnableHoverAnimation="False">
                        <Grid Padding="20,12" RowSpacing="12">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                                <RowDefinition Height="Auto" />
                            </Grid.RowDefinitions>
                            <Grid HorizontalAlignment="Center" CornerRadius="{StaticResource ControlCornerRadius}">
                                <controls:CommonImageEx ImageUrl="{x:Bind Data.Cover.Uri}" ToolTipService.ToolTip="{x:Bind Data.Title}" />
                            </Grid>
                            <TextBlock
                                x:Name="TitleBlock"
                                Style="{StaticResource BodyTextBlockStyle}"
                                Grid.Row="1"
                                HorizontalAlignment="Center"
                                FontWeight="Bold"
                                MaxLines="1"
                                Text="{x:Bind Data.Title}"
                                TextAlignment="Center"
                                TextTrimming="CharacterEllipsis">
                                <ToolTipService.ToolTip>
                                    <ToolTip Content="{x:Bind Data.Title}" IsEnabled="{Binding ElementName=TitleBlock, Path=IsTextTrimmed}" />
                                </ToolTipService.ToolTip>
                            </TextBlock>
                        </Grid>
                    </controls:CardPanel>
                </DataTemplate>
            </controls:VerticalRepeaterView.ItemTemplate>
        </controls:VerticalRepeaterView>
    </ScrollViewer>
</local:PgcSeasonViewBase>
