<UserControl
    xmlns="https://github.com/avaloniaui"
    xmlns:shared="clr-namespace:Tel.Egram.Views.Shared">
    
    <Grid
        ColumnDefinitions="auto,*,auto">
        
        <Border
            Grid.ColumnSpan="3" />
        
        <shared:AvatarControl
            DataContext="{Binding Avatar}"
            Grid.Row="0"
            Grid.Column="0"
            Source="{Binding Bitmap}"
            Color="{Binding Color}"
            TextColor="{Binding TextColor}"
            Text="{Binding Label}"
            Size="24"
            Margin="3,0,0,0"/>

        <Panel
            Classes="Title"
            Grid.Column="1"
            Height="24"
            VerticalAlignment="Center">

            <TextBlock
                Text="{Binding Title}"
                TextWrapping="NoWrap"
                VerticalAlignment="Center" />

        </Panel>
        
        <Panel
            Classes="Indicator"
            Grid.Column="2"
            Height="24"
            VerticalAlignment="Center">
            
            <Border
                IsVisible="{Binding HasUnread}">
                
                <TextBlock
                    Text="{Binding UnreadCount}"
                    VerticalAlignment="Center" />
                
            </Border>
            
        </Panel>

    </Grid>
    
</UserControl>