<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:plugin="clr-namespace:Artemis.UI.Screens.Workshop.SubmissionWizard.Steps.Plugin"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Artemis.UI.Screens.Workshop.SubmissionWizard.Steps.Plugin.PluginSelectionStepView"
             x:DataType="plugin:PluginSelectionStepViewModel">
    <Grid RowDefinitions="Auto,Auto">
        <StackPanel>
            <StackPanel.Styles>
                <Styles>
                    <Style Selector="TextBlock">
                        <Setter Property="TextWrapping" Value="Wrap"></Setter>
                    </Style>
                </Styles>
            </StackPanel.Styles>
            <TextBlock Theme="{StaticResource TitleTextBlockStyle}" TextWrapping="Wrap">
                Plugin selection
            </TextBlock>
            <TextBlock TextWrapping="Wrap">
                Please select the plugin you want to share, a preview will be shown below.
            </TextBlock>
            <Button Command="{CompiledBinding Browse}" Margin="0 20">Browse file</Button>
        </StackPanel>
        <Border Grid.Row="1" Classes="card" ClipToBounds="True" IsVisible="{CompiledBinding SelectedPlugin, Converter={x:Static ObjectConverters.IsNotNull}}">
            <Grid RowDefinitions="30,30,30,30,Auto" ColumnDefinitions="200,Auto">
                <TextBlock Grid.Row="0" Grid.Column="0" FontWeight="SemiBold">Path</TextBlock>
                <TextBlock Grid.Row="0" Grid.Column="1" Text="{CompiledBinding Path}"></TextBlock>
                
                <TextBlock Grid.Row="1" Grid.Column="0" FontWeight="SemiBold">Name</TextBlock>
                <TextBlock Grid.Row="1" Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Name}"></TextBlock>

                <TextBlock Grid.Row="2" Grid.Column="0" FontWeight="SemiBold">Description</TextBlock>
                <TextBlock Grid.Row="2" Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Description}"></TextBlock>
                
                <TextBlock Grid.Row="3" Grid.Column="0" FontWeight="SemiBold">Main entry point</TextBlock>
                <TextBlock Grid.Row="3" Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Main}"></TextBlock>
                
                <TextBlock Grid.Row="4" Grid.Column="0" FontWeight="SemiBold">Version</TextBlock>
                <TextBlock Grid.Row="4" Grid.Column="1" Text="{CompiledBinding SelectedPlugin.Version}"></TextBlock>
            </Grid>
        </Border>
    </Grid>

</UserControl>