<UserControl
    x:Class="Splitter_UI.Views.JobListItemView"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vm="clr-namespace:Splitter_UI.ViewModels"
    xmlns:conv="clr-namespace:Splitter_UI.Converters"
    x:DataType="vm:JobViewModel">

    <UserControl.Resources>
        <conv:RotationAngleToIconConverter x:Key="RotationAngleToIconConverter"/>
        <conv:ActionToIconConverter x:Key="ActionToIconConverter"/>
    </UserControl.Resources>

    <Border Margin="0"
            Padding="0"
            CornerRadius="4"
            Background="#2A2A2A">

        <StackPanel MinWidth="160" MaxWidth="160">

            <Border Width="160" Height="90" ClipToBounds="True">
                <Grid>
                    <Image Source="{Binding Thumbnail}"
                           Stretch="UniformToFill"
                           HorizontalAlignment="Center"
                           VerticalAlignment="Center"/>

                    <TextBlock FontFamily="{StaticResource FontAwesome}"
                               Text="{Binding Rotate, Converter={StaticResource ActionToIconConverter}}"
                               FontSize="12"
                               HorizontalAlignment="Right"
                               Foreground="LimeGreen"/>

                    <TextBlock FontFamily="{StaticResource FontAwesome}"
                               Text="{Binding Rotate, Converter={StaticResource RotationAngleToIconConverter}}"
                               FontSize="12"
                               HorizontalAlignment="Left"
                               Foreground="LimeGreen"/>
                </Grid>
            </Border>

            <TextBlock Text="{Binding FileName}"
                       TextWrapping="Wrap"
                       Margin="0,6,0,0"
                       FontSize="10"/>

        </StackPanel>

    </Border>
</UserControl>
