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

    <Grid x:Name="RootGrid" Background="Black">
        <Grid Margin="0,0,6,0" Visibility="{x:Bind ViewModel.IsPaused, Mode=OneWay}">
            <Image
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                Source="{x:Bind ViewModel.Cover, Mode=OneWay, Converter={StaticResource BitmapConverter}}"
                Stretch="Uniform"
                Visibility="{x:Bind ViewModel.Cover, Mode=OneWay, Converter={StaticResource ObjectToVisibilityConverter}}" />
        </Grid>

        <local:PlayerPresenter x:Name="PlayerPresenter" />
        <Grid x:Name="HiddenControlsContainer">
            <Button
                x:Name="IncreaseVolumeButton"
                Command="{x:Bind ViewModel.IncreaseVolumeCommand, Mode=OneWay}"
                Style="{StaticResource HiddenButtonStyle}">
                <Button.KeyboardAccelerators>
                    <KeyboardAccelerator Key="Up" IsEnabled="True" />
                </Button.KeyboardAccelerators>
            </Button>
            <Button
                x:Name="DecreaseVolumeButton"
                Command="{x:Bind ViewModel.DecreaseVolumeCommand, Mode=OneWay}"
                Style="{StaticResource HiddenButtonStyle}">
                <Button.KeyboardAccelerators>
                    <KeyboardAccelerator Key="Down" IsEnabled="True" />
                </Button.KeyboardAccelerators>
            </Button>
            <Button
                x:Name="ForwardSkipButton"
                Command="{x:Bind ViewModel.ForwardSkipCommand, Mode=OneWay}"
                Style="{StaticResource HiddenButtonStyle}">
                <Button.KeyboardAccelerators>
                    <KeyboardAccelerator Key="Right" IsEnabled="True" />
                </Button.KeyboardAccelerators>
            </Button>
            <Button
                x:Name="BackwardSkipButton"
                Command="{x:Bind ViewModel.BackwardSkipCommand, Mode=OneWay}"
                Style="{StaticResource HiddenButtonStyle}">
                <Button.KeyboardAccelerators>
                    <KeyboardAccelerator Key="Left" IsEnabled="True" />
                </Button.KeyboardAccelerators>
            </Button>
            <Button
                x:Name="HiddenMiniViewButton"
                Command="{x:Bind ViewModel.ToggleCompactOverlayCommand, Mode=OneWay}"
                Style="{StaticResource HiddenButtonStyle}">
                <Button.KeyboardAccelerators>
                    <KeyboardAccelerator
                        Key="M"
                        IsEnabled="True"
                        Modifiers="Control" />
                    <KeyboardAccelerator Key="F9" IsEnabled="True" />
                </Button.KeyboardAccelerators>
            </Button>
            <Button
                x:Name="HiddenFullWindowButton"
                Command="{x:Bind ViewModel.ToggleFullWindowCommand, Mode=OneWay}"
                Style="{StaticResource HiddenButtonStyle}">
                <Button.KeyboardAccelerators>
                    <KeyboardAccelerator Key="F10" IsEnabled="True" />
                </Button.KeyboardAccelerators>
            </Button>
            <Button
                x:Name="HiddenFullScreenButton"
                Command="{x:Bind ViewModel.ToggleFullScreenCommand, Mode=OneWay}"
                Style="{StaticResource HiddenButtonStyle}">
                <Button.KeyboardAccelerators>
                    <KeyboardAccelerator Key="F11" IsEnabled="True" />
                </Button.KeyboardAccelerators>
            </Button>
            <Button
                x:Name="BackToDefaultButton"
                Command="{x:Bind ViewModel.BackToDefaultModeCommand, Mode=OneWay}"
                Style="{StaticResource HiddenButtonStyle}">
                <Button.KeyboardAccelerators>
                    <KeyboardAccelerator Key="Escape" IsEnabled="True" />
                </Button.KeyboardAccelerators>
            </Button>
        </Grid>
    </Grid>
</local:PlayerControlBase>
