<local:GenericRepositoryPublishView x:Class="GitHub.VisualStudio.Views.TeamExplorer.RepositoryPublishView"
                                       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:ghfvs="https://github.com/github/VisualStudio"
                                       xmlns:local="clr-namespace:GitHub.VisualStudio.Views.TeamExplorer"
                                       xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                                       xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0"
                                       Margin="0"
                                       d:DesignHeight="440"
                                       d:DesignWidth="414"
                                       Background="{DynamicResource GitHubVsToolWindowBackground}"
                                       Foreground="{DynamicResource GitHubVsWindowText}"
                                       xmlns:sd="clr-namespace:GitHub.SampleData;assembly=GitHub.App"
                                       d:DataContext="{d:DesignInstance Type=sd:RepositoryPublishViewModelDesigner, IsDesignTimeCreatable=True}"
                                       mc:Ignorable="d"
                                       AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerSyncGitHubRepositoryPublishCustom}" 
                                       IsEnabled="{Binding IsBusy, Converter={ghfvs:InverseBooleanConverter}}">
   
  <Control.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" />
      </ResourceDictionary.MergedDictionaries>
        
        <Style x:Key="VSStyledCheckBox" BasedOn="{StaticResource VsCheckBoxStyleKey}" TargetType="{x:Type CheckBox}">
            <Setter Property="Foreground" Value="{DynamicResource GitHubVsToolWindowText}"/>
            <Setter Property="Background" Value="{DynamicResource GitHubVsToolWindowBackground}"/>
            <Style.Triggers>
                <Trigger Property="UIElement.IsMouseOver" Value="true">
                    <Setter Property="Background" Value="{DynamicResource GitHubVsToolWindowBackground}"/>
                </Trigger>
            </Style.Triggers>
        </Style>
        <Style x:Key="VSStyledComboBox" BasedOn="{StaticResource VsComboBoxStyleKey}" TargetType="{x:Type ComboBox}"/>
        <Style TargetType="{x:Type ghfvs:PromptTextBox}" BasedOn="{StaticResource TeamExplorerPromptTextBox}" />

        <Style BasedOn="{StaticResource VSStyledComboBox}" TargetType="{x:Type ComboBox}">
            <Setter Property="Margin" Value="0,0,0,8" />
            <Setter Property="HorizontalAlignment" Value="Stretch" />
            <Setter Property="Height" Value="23" />
        </Style>
        
        <Style TargetType="Hyperlink" BasedOn="{StaticResource {x:Static vsfx:VsResourceKeys.ThemedDialogHyperlinkStyleKey}}" />
    </ResourceDictionary>
  </Control.Resources>

  <StackPanel Margin="8,6,18,0"
              Orientation="Vertical"
              Style="{DynamicResource DialogContainerStackPanel}">

    <TextBlock TextAlignment="Right">
        <Hyperlink Command="{Binding LoginAsDifferentUser}">
            <Run Text="{x:Static ghfvs:Resources.AddChangeAccounts}" />
        </Hyperlink>
    </TextBlock>
      
    <DockPanel Margin="0,0,0,13" VerticalAlignment="Top">
      <ghfvs:OcticonImage x:Name="octokit"
                       Width="32"
                       Height="32"
                       Margin="0,6,8,0"
                       VerticalAlignment="Center"
                       DockPanel.Dock="Left"
                       Foreground="{DynamicResource GitHubVsToolWindowText}"
                       Icon="mark_github" />
      <Border Height="32"
              Margin="0,6,0,0"
              DockPanel.Dock="Right">
        <TextBlock HorizontalAlignment="Stretch"
                   VerticalAlignment="Center"
                   Foreground="{DynamicResource GitHubVsGrayText}"
                   Text="{x:Static ghfvs:Resources.RepoDoesNotHaveRemoteText}"
                   TextTrimming="CharacterEllipsis"
                   TextWrapping="Wrap"
                   ToolTip="{Binding Text, RelativeSource={RelativeSource Self}}" />
      </Border>
    </DockPanel>

    <ComboBox x:Name="hostsComboBox"
              ItemsSource="{Binding Connections, Mode=OneWay}"
              SelectedItem="{Binding SelectedConnection}"
              AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerPublishHostComboBox}" >
      <ComboBox.ItemTemplate>
        <DataTemplate>
          <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding HostAddress.Title}" />
          </StackPanel>
        </DataTemplate>
      </ComboBox.ItemTemplate>
    </ComboBox>

    <ComboBox x:Name="accountsComboBox"
              ItemsSource="{Binding Accounts, Mode=OneWay}"
              SelectedItem="{Binding SelectedAccount}"
              AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerPublishAccountComboBox}" >
      <ComboBox.ItemTemplate>
        <DataTemplate>
          <StackPanel Orientation="Horizontal">
            <Image Width="15"
                   Height="15"
                   Margin="0,0,8,0"
                   RenderOptions.BitmapScalingMode="HighQuality"
                   Source="{Binding Avatar}" />
            <TextBlock Text="{Binding Login}" />
          </StackPanel>
        </DataTemplate>
      </ComboBox.ItemTemplate>
    </ComboBox>

    <Grid>
            <ghfvs:PromptTextBox x:Name="nameText"
               Height="23"
               Margin="0"
               Background="{DynamicResource GitHubVsSearchBoxBackground}"
               Foreground="{DynamicResource GitHubVsWindowText}"
               MaxLength="{x:Static ghfvs:Constants.MaxRepositoryNameLength}"
               Text="{Binding RepositoryName}"
               PromptText="{x:Static ghfvs:Resources.RepoNameText}"
               SpellCheck.IsEnabled="True"
               AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerPublishRepositoryNameTextBox}"
               VerticalContentAlignment="Center"/>
    </Grid>
    
    <Grid>
      <ghfvs:PromptTextBox x:Name="description"
               Height="23"
               Margin="0,8,0,0"
               Background="{DynamicResource GitHubVsSearchBoxBackground}"
               Foreground="{DynamicResource GitHubVsWindowText}"
               Text="{Binding Description}"
               TextWrapping="WrapWithOverflow"
               PromptText="{x:Static ghfvs:Resources.DescriptionOptional}"
               SpellCheck.IsEnabled="True"
               AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerPublishRepositoryDescriptionTextBox}"
               VerticalContentAlignment="Center" />
    </Grid>

        <CheckBox x:Name="makePrivate"
              Margin="0,8,0,0"
              IsChecked="{Binding KeepPrivate}"
              Style="{StaticResource VSStyledCheckBox}"
              Content="{x:Static ghfvs:Resources.makePrivateContent}"
              AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerPrivateRepositoryCheckBox}" />

        <Button x:Name="publishRepositoryButton"
            Margin="0,8,0,0"
            HorizontalAlignment="Left"
            IsDefault="True"
            Style="{StaticResource GitHubVsButton}"
            AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.TeamExplorerPublishRepositoryButton}" >
            <TextBlock Text="{x:Static ghfvs:Resources.publishText}" />
        </Button>

  </StackPanel>
</local:GenericRepositoryPublishView>
