<?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:components="using:BiliCopilot.UI.Controls.Components"
    xmlns:converters="using:BiliCopilot.UI.Converters"
    xmlns:core="using:BiliCopilot.UI.ViewModels.Core"
    xmlns:ext="using:BiliCopilot.UI.Extensions"
    xmlns:ic="using:FluentIcons.WinUI"
    xmlns:local="using:BiliCopilot.UI.Controls.Core">

    <ResourceDictionary.ThemeDictionaries>
        <ResourceDictionary x:Key="Light">
            <SolidColorBrush
                x:Key="TransportBackground"
                Opacity="0.78"
                Color="White" />
        </ResourceDictionary>
        <ResourceDictionary x:Key="Default">
            <SolidColorBrush
                x:Key="TransportBackground"
                Opacity="0.67"
                Color="Black" />
        </ResourceDictionary>
        <ResourceDictionary x:Key="HighContrast">
            <SolidColorBrush x:Key="TransportBackground" Color="{ThemeResource SystemColorWindowColor}" />
        </ResourceDictionary>
    </ResourceDictionary.ThemeDictionaries>

    <Style x:Key="HiddenButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="Width" Value="1" />
        <Setter Property="Height" Value="1" />
        <Setter Property="BorderThickness" Value="0" />
        <Setter Property="IsTabStop" Value="False" />
        <Setter Property="TabFocusNavigation" Value="Once" />
        <Setter Property="TabNavigation" Value="Once" />
        <Setter Property="XYFocusKeyboardNavigation" Value="Disabled" />
        <Setter Property="AutomationProperties.AccessibilityView" Value="Raw" />
    </Style>

    <converters:FullScreenConverter x:Key="FullScreenConverter" />
    <converters:CompactOverlayConverter x:Key="CompactOverlayConverter" />
    <converters:FullWindowConverter x:Key="FullWindowConverter" />

    <Style
        x:Key="TransportButtonFlyoutPresenterStyle"
        BasedOn="{StaticResource DefaultFlyoutPresenterStyle}"
        TargetType="FlyoutPresenter">
        <Setter Property="Padding" Value="12,10" />
    </Style>

    <Style TargetType="local:IslandPlayer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:IslandPlayer">
                    <Grid x:Name="RootGrid" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:ExternalPlayer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ExternalPlayer">
                    <ScrollViewer
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        Style="{StaticResource PageScrollViewerStyle}"
                        VerticalScrollBarVisibility="Hidden">
                        <Grid Padding="12">
                            <TextBlock
                                x:Name="HolderBlock"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Style="{StaticResource BodyStrongTextBlockStyle}"
                                Text="{ext:Locale Name=WatchOnExternalPlayer}"
                                TextAlignment="Center" />
                            <TextBlock
                                x:Name="MessageBlock"
                                LineHeight="24"
                                TextWrapping="Wrap" />
                        </Grid>
                    </ScrollViewer>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="local:NativePlayer">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:NativePlayer">
                    <Grid x:Name="RootGrid" Background="Black" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
