<UserControl x:Class="GitHub.VisualStudio.UI.Views.GitHubHomeContent"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             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:ghfvs="https://github.com/github/VisualStudio"
             Width="Auto"
             Height="auto"
             Background="{DynamicResource GitHubVsToolWindowBackground}"
             DataContext="{Binding ViewModel}"
             d:DesignHeight="68"
             d:DesignWidth="300"
             mc:Ignorable="d">
  <d:DesignProperties.DataContext>
    <Binding>
      <Binding.Source>
        <ghfvs:GitHubHomeSectionDesigner />
      </Binding.Source>
    </Binding>
  </d:DesignProperties.DataContext>

  <UserControl.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.VisualStudio.UI;component/SharedDictionary.xaml" />
        <ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
        <StaticResource ResourceKey="ThemedDialogDefaultStylesKey"/>
      </ResourceDictionary.MergedDictionaries>
      <ghfvs:BooleanToInverseVisibilityConverter x:Key="BooleanToInverseVisibilityConverter" />
    </ResourceDictionary>
  </UserControl.Resources>

  <StackPanel Margin="4,6,4,6">
    <DockPanel>
      <ghfvs:OcticonImage x:Name="repositoryIcon"
                  Width="32"
                  Height="32"
                  Margin="0,0,8,0"
                  VerticalAlignment="Center"
                  DockPanel.Dock="Left"
                  Foreground="{DynamicResource GitHubVsToolWindowText}"
                  Icon="{Binding Path=Icon}" />
          
      <TextBlock DockPanel.Dock="Top"
                  Foreground="{DynamicResource GitHubVsToolWindowText}"
                  Padding="0"
                  Text="{Binding Path=RepoName}"
                  TextTrimming="CharacterEllipsis"
                  Margin="0,-2,0,0" />
      <TextBlock Foreground="{DynamicResource GitHubVsGrayText}">
        <Hyperlink Command="{Binding OpenOnGitHub}">
            <TextBlock Text="{Binding RepoUrl}" TextTrimming="CharacterEllipsis"/>
        </Hyperlink>
      </TextBlock>
    </DockPanel>
  
    <Button Margin="0,6,0,0"
              x:Name="signIn" 
              Click="signIn_Click"
              Visibility="{Binding IsLoggedIn, Converter={StaticResource BooleanToInverseVisibilityConverter}}"
              Style="{StaticResource ActionLinkButton}" 
              Content="{x:Static ghfvs:Resources.SignInCallToAction}" />
  </StackPanel>
</UserControl>
