<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:viewModels="clr-namespace:Nebula.Launcher.ViewModels"
             xmlns:popup="clr-namespace:Nebula.Launcher.ViewModels.Popup"
             xmlns:models="clr-namespace:Nebula.Launcher.Models"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Nebula.Launcher.Views.Popup.LogPopupView"
             x:DataType="popup:LogPopupModelView">
    <Design.DataContext>
        <popup:LogPopupModelView />
    </Design.DataContext>

    <ScrollViewer Margin="10" Padding="0,0,8,0">
        <ItemsControl
            Background="#00000000"
            ItemsSource="{Binding Logs}"
            Padding="0">
            <ItemsControl.ItemTemplate>
                <DataTemplate DataType="{x:Type models:LogInfo}">
                    <Border CornerRadius="5" Margin="0,0,0,5">
                        <StackPanel Orientation="Horizontal" Spacing="5" Margin="0">
                            <Border MinWidth="100"
                                    Background="{Binding CategoryColor}"
                                    CornerRadius="5"
                                    Padding="10,0,12,0" >
                                <Label FontSize="15" VerticalAlignment="Center">
                                    <TextBlock Text="{Binding Category }" />
                                </Label>
                            </Border>
                            <Label FontSize="12" VerticalAlignment="Center">
                                <TextBlock Text="{Binding Message }" />
                            </Label>
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
    </ScrollViewer>
</UserControl>