<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary
    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:local="using:BiliCopilot.UI.Controls.Components">
    <Style TargetType="local:ShimmerLayout">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ShimmerLayout">
                    <Grid
                        Padding="16"
                        ColumnSpacing="24"
                        RowSpacing="24">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="56" />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="220" />
                            <ColumnDefinition />
                        </Grid.ColumnDefinitions>

                        <base:Shimmer
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            CornerRadius="{StaticResource OverlayCornerRadius}"
                            IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />

                        <StackPanel Grid.Row="1" Spacing="12">
                            <base:Shimmer
                                Height="40"
                                HorizontalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Height="40"
                                HorizontalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Height="40"
                                HorizontalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                        </StackPanel>

                        <base:Shimmer
                            Grid.Column="1"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            CornerRadius="{StaticResource OverlayCornerRadius}"
                            IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />

                        <Grid
                            Grid.Row="1"
                            Grid.Column="1"
                            ColumnSpacing="20"
                            RowSpacing="20">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition />
                                <ColumnDefinition />
                                <ColumnDefinition />
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                                <RowDefinition />
                                <RowDefinition />
                            </Grid.RowDefinitions>

                            <base:Shimmer
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Column="1"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Column="2"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Row="1"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Row="1"
                                Grid.Column="1"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Row="1"
                                Grid.Column="2"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Row="2"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Row="2"
                                Grid.Column="1"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Row="2"
                                Grid.Column="2"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="PlayerShimmerStyle" TargetType="local:ShimmerLayout">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ShimmerLayout">
                    <Grid
                        Padding="16"
                        ColumnSpacing="24"
                        RowSpacing="24">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="56" />
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition />
                            <ColumnDefinition Width="280" />
                        </Grid.ColumnDefinitions>

                        <base:Shimmer
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            CornerRadius="{StaticResource OverlayCornerRadius}"
                            IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />

                        <Grid Grid.Row="1" RowSpacing="20">
                            <Grid.RowDefinitions>
                                <RowDefinition Height="3*" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <base:Shimmer
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                            <base:Shimmer
                                Grid.Row="1"
                                HorizontalAlignment="Stretch"
                                VerticalAlignment="Stretch"
                                CornerRadius="{StaticResource OverlayCornerRadius}"
                                IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                        </Grid>

                        <base:Shimmer
                            Grid.Column="1"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            CornerRadius="{StaticResource OverlayCornerRadius}"
                            IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />

                        <base:Shimmer
                            Grid.Row="1"
                            Grid.Column="1"
                            HorizontalAlignment="Stretch"
                            VerticalAlignment="Stretch"
                            CornerRadius="{StaticResource OverlayCornerRadius}"
                            IsActive="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=IsActive}" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
