<UserControl xmlns="https://github.com/avaloniaui"
             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:vm="using:SourceGit.ViewModels"
             xmlns:v="using:SourceGit.Views"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="SourceGit.Views.Clone"
             x:DataType="vm:Clone">
  <StackPanel Orientation="Vertical" Margin="8,0,0,0">
    <TextBlock Classes="bold" FontSize="18" Text="{DynamicResource Text.Clone}"/>

    <Grid Margin="8,16,0,0" RowDefinitions="32,Auto,32,32,32" ColumnDefinitions="Auto,*">
      <TextBlock Grid.Row="0" Grid.Column="0" 
                 HorizontalAlignment="Right" 
                 Margin="0,0,8,0" 
                 Text="{DynamicResource Text.Clone.RemoteURL}"/>
      <TextBox Grid.Row="0" Grid.Column="1" 
               Height="28"
               CornerRadius="3" 
               Text="{Binding Remote, Mode=TwoWay}" 
               v:AutoFocusBehaviour.IsEnabled="True"/>

      <TextBlock Grid.Row="1" Grid.Column="0"
                 HorizontalAlignment="Right"
                 Margin="0,0,8,0"
                 Text="{DynamicResource Text.SSHKey}"
                 IsVisible="{Binding UseSSH}"/>
      <TextBox Grid.Row="1" Grid.Column="1"
               x:Name="TxtSshKey"
               Height="28"
               CornerRadius="3"
               Watermark="{DynamicResource Text.SSHKey.Placeholder}"
               Text="{Binding SSHKey, Mode=TwoWay}"
               IsVisible="{Binding UseSSH}">
        <TextBox.InnerRightContent>
          <Button Classes="icon_button" Width="28" Height="28" Click="SelectSSHKey">
            <Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
          </Button>
        </TextBox.InnerRightContent>
      </TextBox>

      <TextBlock Grid.Row="2" Grid.Column="0" 
                 HorizontalAlignment="Right" 
                 Margin="0,0,8,0" 
                 Text="{DynamicResource Text.Clone.ParentFolder}"/>
      <TextBox Grid.Row="2" Grid.Column="1"
               x:Name="TxtParentFolder"
               Height="28"
               CornerRadius="3"
               Text="{Binding ParentFolder, Mode=TwoWay}">
        <TextBox.InnerRightContent>
          <Button Classes="icon_button" Width="28" Height="28" Margin="4,0,0,0" Click="SelectParentFolder">
            <Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>
          </Button>
        </TextBox.InnerRightContent>
      </TextBox>

      <TextBlock Grid.Row="3" Grid.Column="0" 
                 HorizontalAlignment="Right" 
                 Margin="0,0,8,0" 
                 Text="{DynamicResource Text.Clone.LocalName}"/>
      <TextBox Grid.Row="3" Grid.Column="1"
               Height="28"
               CornerRadius="3"
               Watermark="{DynamicResource Text.Clone.LocalName.Placeholder}" 
               Text="{Binding Local, Mode=TwoWay}"/>

      <TextBlock Grid.Row="4" Grid.Column="0" 
                 HorizontalAlignment="Right" 
                 Margin="0,0,8,0" 
                 Text="{DynamicResource Text.Clone.AdditionalParam}"/>
      <TextBox Grid.Row="4" Grid.Column="1"
               Height="28"
               CornerRadius="3" 
               Watermark="{DynamicResource Text.Clone.AdditionalParam.Placeholder}" 
               Text="{Binding ExtraArgs, Mode=TwoWay}"/>
    </Grid>
  </StackPanel>
</UserControl>
