<UserControl x:Class="GitHub.VisualStudio.Views.Dialog.Clone.RepositoryCloneView"
             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:ghfvs="https://github.com/github/VisualStudio"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:GitHub.VisualStudio.Views.Dialog.Clone"
             xmlns:uic="clr-namespace:GitHub.VisualStudio.UI.Controls"
             xmlns:vs="clr-namespace:Microsoft.VisualStudio.PlatformUI;assembly=Microsoft.VisualStudio.Shell.14.0"
             Background="{DynamicResource {x:Static vs:ThemedDialogColors.WindowPanelBrushKey}}"
             Foreground="{DynamicResource {x:Static vs:ThemedDialogColors.WindowPanelTextBrushKey}}"
             Margin="12,0,12,12"
             mc:Ignorable="d" d:DesignHeight="414" d:DesignWidth="440">
    <d:DesignData.DataContext>
        <ghfvs:RepositoryCloneViewModelDesigner/>
    </d:DesignData.DataContext>

    <Control.Resources>
        <ResourceDictionary Source="../DialogStyles.xaml" />
    </Control.Resources>

    <DockPanel>
        <StackPanel Orientation="Horizontal" DockPanel.Dock="Bottom" HorizontalAlignment="Right" Margin="0,18,0,0">
            <Button
                HorizontalAlignment="Center"
                IsDefault="True"
                Command="{Binding Clone}"
                Content="{x:Static ghfvs:Resources.OpenFromGitHubClone}"
                AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.CloneRepositoryButton}"
                KeyboardNavigation.TabIndex="5" />

            <Button
                Margin="6,0,0,0"
                HorizontalAlignment="Center"
                IsDefault="True"
                Command="{Binding Open}"
                Content="{x:Static ghfvs:Resources.Open}"
                AutomationProperties.AutomationId="{x:Static ghfvs:AutomationIDs.OpenRepositoryButton}"
                KeyboardNavigation.TabIndex="6"/>
        </StackPanel>

        <TextBlock DockPanel.Dock="Top" TextAlignment="Right">
            <Hyperlink Command="{Binding LoginAsDifferentUser}">
                <Run Text="{x:Static ghfvs:Resources.AddChangeAccounts}" />
            </Hyperlink>
        </TextBlock>
            
        <DockPanel DockPanel.Dock="Bottom" Margin="0,9,0,0">
            <Label DockPanel.Dock="Left" Content="{x:Static ghfvs:Resources.localPathText}" />
            <Button DockPanel.Dock="Right"
                    Command="{Binding Browse}"
                    VerticalContentAlignment="Center"
                    KeyboardNavigation.TabIndex="4">
                <x:Static Member="ghfvs:Resources.OpenFromGitHubBrowse" />
            </Button>
            <TextBox Text="{Binding Path, UpdateSourceTrigger=PropertyChanged}" Margin="6,0"
                     VerticalContentAlignment="Center"
                     KeyboardNavigation.TabIndex="3" />
        </DockPanel>

        <uic:InfoPanel Message="{Binding PathWarning}"
                       DockPanel.Dock="Bottom"
                       Margin="0"/>

        <TabControl SelectedIndex="{Binding SelectedTabIndex}"
                    Style="{StaticResource LightModalViewTabControl}">
            <TabItem Header="GitHub.com"
                     Style="{DynamicResource LightModalViewTabItem}"
                     Visibility="{Binding GitHubTab.IsEnabled, Converter={ghfvs:BooleanToVisibilityConverter}}">
                <local:SelectPageView DataContext="{Binding GitHubTab}"/>
            </TabItem>
            <TabItem Header="Enterprise"
                     Style="{DynamicResource LightModalViewTabItem}"
                     Visibility="{Binding EnterpriseTab.IsEnabled, Converter={ghfvs:BooleanToVisibilityConverter}}">
                <local:SelectPageView DataContext="{Binding EnterpriseTab}"/>
            </TabItem>
        </TabControl>
    </DockPanel>
</UserControl>
