<?xml version="1.0" encoding="utf-8" ?>
<local:NotifyMessageControlBase
    x:Class="BiliCopilot.UI.Controls.Message.NotifyMessageSideItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="using:BiliCopilot.UI.Converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ic="using:FluentIcons.WinUI"
    xmlns:local="using:BiliCopilot.UI.Controls.Message"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <UserControl.Resources>
        <converters:NotifyMessageIconConverter x:Key="IconConverter" />
        <converters:NotifyMessageTextConverter x:Key="TextConverter" />
    </UserControl.Resources>

    <Grid ColumnSpacing="8">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <ic:SymbolIcon
            VerticalAlignment="Center"
            FontSize="14"
            Symbol="{x:Bind ViewModel.Type, Converter={StaticResource IconConverter}, Mode=OneWay}" />
        <TextBlock
            Grid.Column="1"
            VerticalAlignment="Center"
            Text="{x:Bind ViewModel.Type, Converter={StaticResource TextConverter}, Mode=OneWay}" />
        <InfoBadge
            Grid.Column="2"
            VerticalAlignment="Center"
            Visibility="{x:Bind ViewModel.UnreadCount, Mode=OneWay, Converter={StaticResource ObjectToVisibilityConverter}}"
            Value="{x:Bind ViewModel.UnreadCount, Mode=OneWay}" />
    </Grid>
</local:NotifyMessageControlBase>
