<local:GenericPullRequestCheckView x:Class="GitHub.VisualStudio.Views.GitHubPane.PullRequestCheckView"
                                   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
                                   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
                                   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                                   xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                                   xmlns:local="clr-namespace:GitHub.VisualStudio.Views.GitHubPane"
                                   xmlns:ghfvs="https://github.com/github/VisualStudio"
                                   xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI"
                                   d:DesignWidth="600"
                                   Background="{DynamicResource GitHubVsToolWindowBackground}"
                                   Foreground="{DynamicResource GitHubVsWindowText}"
                                   mc:Ignorable="d">

    <d:DesignData.DataContext>
        <ghfvs:PullRequestCheckViewModelDesigner />
    </d:DesignData.DataContext>

    <Control.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
                <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
                <StaticResource ResourceKey="ThemedDialogDefaultStylesKey"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Control.Resources>

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition MaxHeight="32"/>
        </Grid.RowDefinitions>

        <ghfvs:OcticonImage Grid.Column="0" Margin="0 0 4 0" Icon="check" Foreground="#2cbe4e" Visibility="{Binding Status, Converter={ghfvs:EqualsToVisibilityConverter Success}}"/>
        <ghfvs:OcticonImage Grid.Column="0" Margin="0 0 4 0" Icon="x" Foreground="#cb2431" Visibility="{Binding Status, Converter={ghfvs:EqualsToVisibilityConverter Failure}}"/>
        <ghfvs:OcticonImage Grid.Column="0" Margin="0 0 4 0" Icon="primitive_dot" Foreground="#f1c647" Visibility="{Binding Status, Converter={ghfvs:EqualsToVisibilityConverter Pending}}"/>

        <Label Grid.Column="1" Foreground="{DynamicResource VsBrush.WindowText}">
            <TextBlock TextTrimming="CharacterEllipsis" Text="{Binding Title}" />
        </Label>

        <Label Grid.Column="2" HorizontalContentAlignment="Stretch" Visibility="{Binding HasAnnotations, Converter={ghfvs:BooleanToVisibilityConverter}}">
            <Hyperlink ToolTip="View checks"
                           Command="{Binding Path=DataContext.ShowAnnotations, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type local:PullRequestDetailView}}}"
                           CommandParameter="{Binding}">
                Checks
            </Hyperlink>
        </Label>
        
        <Label Grid.Column="3" HorizontalContentAlignment="Stretch" Visibility="{Binding DetailsUrl, Converter={ghfvs:NullToVisibilityConverter}}">
            <Hyperlink ToolTip="{Binding DetailsUrl}"  Command="{Binding OpenDetailsUrl}">Details</Hyperlink>
        </Label>
    </Grid>
</local:GenericPullRequestCheckView>

