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

    <StackPanel Spacing="8">
        <StackPanel
            HorizontalAlignment="Left"
            Orientation="Horizontal"
            Spacing="8">
            <Border
                Padding="4,2"
                VerticalAlignment="Center"
                BorderBrush="{x:Bind ViewModel.Color, Mode=OneWay, Converter={StaticResource BrushConverter}}"
                BorderThickness="1"
                CornerRadius="{StaticResource ControlCornerRadius}">
                <TextBlock
                    FontSize="12"
                    Foreground="{x:Bind ViewModel.Color, Mode=OneWay, Converter={StaticResource BrushConverter}}"
                    Text="{x:Bind ViewModel.Level, Mode=OneWay}" />
            </Border>
            <TextBlock
                VerticalAlignment="Center"
                MaxLines="1"
                Text="{x:Bind ViewModel.User, Mode=OneWay}"
                TextTrimming="CharacterEllipsis" />
        </StackPanel>
        <Border
            Padding="12,8,12,0"
            HorizontalAlignment="Left"
            Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
            CornerRadius="{StaticResource ControlCornerRadius}">
            <TextBlock
                LineHeight="28"
                Text="{x:Bind ViewModel.Message, Mode=OneWay}"
                TextWrapping="Wrap" />
        </Border>
    </StackPanel>
</local:LiveDanmakuItemControlBase>
