<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:sidebar="clr-namespace:Artemis.UI.Screens.Sidebar"
             xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Artemis.UI.Screens.Sidebar.ModuleActivationRequirementView"
             x:DataType="sidebar:ModuleActivationRequirementViewModel">
    <UserControl.Styles>
        <Styles>
            <Style Selector="Border.status-border">
                <Setter Property="Width" Value="32" />
                <Setter Property="Height" Value="32" />
                <Setter Property="CornerRadius" Value="16" />
            </Style>

            <Style Selector="Border.status-border avalonia|MaterialIcon">
                <Setter Property="Width" Value="16" />
                <Setter Property="Height" Value="16" />
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="HorizontalAlignment" Value="Center" />
            </Style>
        </Styles>
    </UserControl.Styles>
    <StackPanel>
        <Border Classes="card-separator" />
        <Grid ColumnDefinitions="*,Auto">
            <StackPanel Grid.Column="0">
                <TextBlock TextWrapping="Wrap" Text="{CompiledBinding RequirementName}" />
                <TextBlock Classes="subtitle" TextWrapping="Wrap" Text="{CompiledBinding RequirementDescription}" />
            </StackPanel>

            <Border Grid.Row="0" Grid.Column="1" Classes="status-border" IsVisible="{CompiledBinding !RequirementMet}" Background="#ff3838">
                <avalonia:MaterialIcon Kind="Close" />
            </Border>
            <Border Grid.Row="0" Grid.Column="1" Classes="status-border" IsVisible="{CompiledBinding RequirementMet}" Background="#32a852">
                <avalonia:MaterialIcon Kind="Check" />
            </Border>
        </Grid>
    </StackPanel>
</UserControl>