<UserControl x:Class="WowUp.WPF.Views.AboutView"
             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:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:WowUp.WPF.Views"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <UserControl.Resources>
        <ResourceDictionary >
            <Style x:Key="HyperlinkStyle" TargetType="Hyperlink">
                <Setter Property="Foreground" Value="White" />
            </Style>

            <Style x:Key="TitleStyle" TargetType="TextBlock">
                <Setter Property="FontSize" Value="20" />
                <Setter Property="HorizontalAlignment" Value="Center" />
                <Setter Property="FontWeight" Value="Bold" />
                <Setter Property="Foreground" Value="White" />
            </Style>

            <Style x:Key="VersionStyle" TargetType="TextBlock">
                <Setter Property="FontSize" Value="16" />
                <Setter Property="Foreground" Value="{StaticResource White2Brush}" />
            </Style>

            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>

    <ScrollViewer VerticalScrollBarVisibility="Auto" BorderThickness="0" BorderBrush="Transparent">
        <Grid Background="{StaticResource Dark3}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <StackPanel Grid.Row="0">
                <Image Source="/Assets/wowup_logo_512np.png" Width="150"
                       RenderOptions.BitmapScalingMode="HighQuality"/>
                <TextBlock Text="WowUp.io" Style="{StaticResource TitleStyle}" />
                <TextBlock HorizontalAlignment="Center" Text="{Binding Version}" Style="{StaticResource VersionStyle}" />
                <TextBlock HorizontalAlignment="Center" FontSize="16" Margin="0, 10, 0, 0">
                <Hyperlink x:Name="WowupLink" Style="{StaticResource HyperlinkStyle}" 
                           NavigateUri="https://wowup.io" RequestNavigate="WowupLink_RequestNavigate">
                    Check out the website!
                </Hyperlink>
                </TextBlock>
                <!--<TextBlock Margin="0 10" HorizontalAlignment="Center">
                    <Hyperlink NavigateUri="https://www.patreon.com/jliddev" TextDecorations="None" RequestNavigate="WowupLink_RequestNavigate">
                        <Image Source="/Assets/patron.png" Width="120"  />
                    </Hyperlink>
                </TextBlock>-->
            </StackPanel>
            <Grid Grid.Row="1">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <Border Padding="10" Grid.Row="0">
                    <TextBlock Text="Change Log" FontSize="18"/>
                </Border>
                <ItemsControl Padding="10" ItemsSource="{Binding ChangeLogs}" Grid.Row="1">
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <Border Margin="0 10" Padding="10 0" BorderBrush="{StaticResource Purple1}" BorderThickness="1 0 0 0">
                                <StackPanel >
                                    <TextBlock FontSize="13" FontWeight="Medium" Text="{Binding Version}" />
                                    <TextBlock FontSize="12" Text="{Binding Description}" />
                                </StackPanel>
                            </Border>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
                <!--<ListView ItemsSource="{Binding ChangeLogs}" Grid.Row="1"
                      Background="Transparent"
                      BorderBrush="Transparent">
                    <ListView.ItemContainerStyle>
                        <Style TargetType="{x:Type ListViewItem}">
                            <Style.Triggers>
                                <Trigger Property="IsSelected"
                             Value="True">
                                    <Setter Property="Background"
                                Value="{x:Null}" />
                                    <Setter Property="BorderBrush"
                                Value="{x:Null}" />
                                </Trigger>
                            </Style.Triggers>
                        </Style>
                    </ListView.ItemContainerStyle>
                    <ListView.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="0, 10">
                                <TextBlock Text="{Binding Version}" />
                                <TextBlock Text="{Binding Description}" />
                            </StackPanel>
                        </DataTemplate>
                    </ListView.ItemTemplate>
                </ListView>-->
            </Grid>
        </Grid>
    </ScrollViewer>
</UserControl>
