<?xml version="1.0" encoding="utf-8" ?>
<local:SubtitleControlBase
    x:Class="BiliCopilot.UI.Controls.Player.SubtitlePresenter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:BiliCopilot.UI.Controls.Player"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid
        x:Name="RootGrid"
        Padding="{x:Bind Padding, Mode=OneWay}"
        HorizontalAlignment="Center"
        Background="{ThemeResource TransportBackground}"
        CornerRadius="{StaticResource OverlayCornerRadius}"
        Visibility="{x:Bind ViewModel.CurrentSubtitle, Mode=OneWay, Converter={StaticResource ObjectToVisibilityConverter}}">
        <TextBlock
            VerticalAlignment="Center"
            FontSize="{x:Bind FontSize, Mode=OneWay}"
            Text="{x:Bind ViewModel.CurrentSubtitle, Mode=OneWay}"
            TextAlignment="Center"
            TextWrapping="Wrap" />
    </Grid>
</local:SubtitleControlBase>
