<Window x:Class="PixiEditor.Views.Dialogs.AboutPopup"
        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:PixiEditor.Views.Dialogs"
        xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
        xmlns:behaviours="clr-namespace:PixiEditor.Helpers.Behaviours"
        xmlns:cmds="clr-namespace:PixiEditor.Models.Commands.XAML"
        xmlns:userControls="clr-namespace:PixiEditor.Views.UserControls"
        xmlns:views="clr-namespace:PixiEditor.Views"
        xmlns:helpers="clr-namespace:PixiEditor.Helpers"
        xmlns:ui="clr-namespace:PixiEditor.Extensions.UI;assembly=PixiEditor.Extensions"
        mc:Ignorable="d" WindowStyle="None"
        ui:Translator.Key="ABOUT"
        WindowStartupLocation="CenterScreen"
        Name="aboutPopup"
        Width="440" Height="510"
        MaxWidth="440" MaxHeight="510"
        FlowDirection="{helpers:Localization FlowDirection}">
    <Window.CommandBindings>
        <CommandBinding Command="{x:Static SystemCommands.CloseWindowCommand}" CanExecute="CommandBinding_CanExecute"
                        Executed="CommandBinding_Executed_Close" />
    </Window.CommandBindings>
    
    <WindowChrome.WindowChrome>
        <WindowChrome CaptionHeight="32"  GlassFrameThickness="0.1"
                      ResizeBorderThickness="0" />
    </WindowChrome.WindowChrome>

    <DockPanel Background="{StaticResource AccentColor}" Focusable="True">
        <b:Interaction.Behaviors>
            <behaviours:ClearFocusOnClickBehavior/>
        </b:Interaction.Behaviors>

        <local:DialogTitleBar DockPanel.Dock="Top"
                             TitleKey="ABOUT" 
                             CloseCommand="{x:Static SystemCommands.CloseWindowCommand}"/>
        <StackPanel DataContext="{Binding ElementName=aboutPopup}" Orientation="Vertical" DockPanel.Dock="Bottom" Margin="10">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top">
                <Image Source="../../Images/PixiEditorLogo.png" Height="40" VerticalAlignment="Center"/>
                <TextBlock FontSize="40" FontWeight="SemiBold" Foreground="White" VerticalAlignment="Center" Margin="10,0,0,0">PixiEditor</TextBlock>
            </StackPanel>
            <TextBlock Foreground="White" HorizontalAlignment="Center" FontSize="20" FontWeight="Medium" ui:Translator.LocalizedString="{Binding VersionText}"/>
            <Label ui:Translator.Key="PROJECT_MAINTAINERS" Style="{StaticResource Header2}" Margin="10 20 0 5"/>
            <StackPanel Orientation="Horizontal" Margin="20 0">
                <Ellipse Width="32" Height="32" FlowDirection="LeftToRight">
                    <Ellipse.Fill>
                        <ImageBrush ImageSource="/Images/SocialMedia/Avatars/flabbet.png"/>
                    </Ellipse.Fill>
                </Ellipse>
                <Label Style="{StaticResource SettingsText}" Margin="10 0 0 0" FontSize="14">
                    <Hyperlink Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://github.com/flabbet" Style="{StaticResource SettingsLink}">
                        <Run Text="Krzysztof Krysiński (flabbet)"/>
                        <Run Text="" FontFamily="{StaticResource Feather}"/>
                    </Hyperlink>
                </Label>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="20 5">
                <Ellipse Width="32" Height="32" FlowDirection="LeftToRight">
                    <Ellipse.Fill>
                        <ImageBrush ImageSource="/Images/SocialMedia/Avatars/Equbuxu.png"/>
                    </Ellipse.Fill>
                </Ellipse>
                <Label Style="{StaticResource SettingsText}"  Margin="10 0 0 0" FontSize="14">
                    <Hyperlink Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://github.com/equbuxu" Style="{StaticResource SettingsLink}">
                        <Run Text="Egor Mozgovoy (Equbuxu)"/>
                        <Run Text="" FontFamily="{StaticResource Feather}"/>
                    </Hyperlink>
                </Label>
            </StackPanel>
            <StackPanel Orientation="Horizontal" Margin="20 0">
                <Ellipse Width="32" Height="32" FlowDirection="LeftToRight">
                    <Ellipse.Fill>
                        <ImageBrush ImageSource="/Images/SocialMedia/Avatars/CPK.png"/>
                    </Ellipse.Fill>
                </Ellipse>
                <Label Style="{StaticResource SettingsText}" Margin="10 0 0 0" FontSize="14">
                    <Hyperlink Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://github.com/CPKreuz" Style="{StaticResource SettingsLink}">
                        <Run Text="Philip Kreuz (cpk)"/>
                        <Run Text="" FontFamily="{StaticResource Feather}"/>
                    </Hyperlink>
                </Label>
            </StackPanel>
            
            <Label Style="{StaticResource SettingsText}" Margin="20 10 0 0" FontSize="14">
                <Hyperlink Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://github.com/PixiEditor/PixiEditor/graphs/contributors"
                           Style="{StaticResource SettingsLink}">
                    <Run ui:Translator.Key="OTHER_AWESOME_CONTRIBUTORS" />
                    <Run Text="" FontFamily="{StaticResource Feather}"/>
                </Hyperlink>
            </Label>
            
            <Separator Margin="0 10 0 0"/>
            
            <Label Style="{StaticResource SettingsText}" Margin="20 10 0 0" FontSize="14">
                <Hyperlink Command="{cmds:Command PixiEditor.Links.OpenLicense}"
                           Style="{StaticResource SettingsLink}">
                    <Run ui:Translator.Key="LICENSE"/>
                    <Run Text="" FontFamily="{StaticResource Feather}"/>
                </Hyperlink>
            </Label>
            
            <Label Style="{StaticResource SettingsText}" Margin="20 10 0 0" FontSize="14">
                <Hyperlink Command="{cmds:Command PixiEditor.Links.OpenOtherLicenses}"
                           Style="{StaticResource SettingsLink}">
                    <Run ui:Translator.Key="THIRD_PARTY_LICENSES"/>
                    <Run Text="" FontFamily="{StaticResource Feather}"/>
                </Hyperlink>
            </Label>
            
            <Label Style="{StaticResource SettingsText}" Margin="20 10 0 0" FontSize="14">
                <Hyperlink Command="{cmds:Command PixiEditor.Links.OpenDocumentation}"
                           Style="{StaticResource SettingsLink}">
                    <Run ui:Translator.Key="DOCUMENTATION" />
                    <Run Text="" FontFamily="{StaticResource Feather}"/>
                </Hyperlink>
            </Label>
            
            <userControls:AlignableWrapPanel DockPanel.Dock="Bottom" HorizontalContentAlignment="Center" HorizontalAlignment="Center" Margin="0,20,0,15">
                    <Button Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://pixieditor.net"
                            Style="{StaticResource SocialMediaButton}" Tag="#e3002d" ui:Translator.TooltipKey="WEBSITE"
                            Content="/Images/SocialMedia/WebsiteIcon.png"/>
                    <Button Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://discord.gg/tzkQFDkqQS"
                            Style="{StaticResource SocialMediaButton}" Tag="#7289DA" ui:Translator.TooltipKey="DISCORD"
                            Content="/Images/SocialMedia/DiscordIcon.png"/>
                    <Button Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://reddit.com/r/PixiEditor"
                            Style="{StaticResource SocialMediaButton}" Tag="#FF4500" ui:Translator.TooltipKey="REDDIT"
                            Content="/Images/SocialMedia/RedditIcon.png"/>
                    <Button Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://store.steampowered.com/app/2218560"
                            Style="{StaticResource SocialMediaButton}" Tag="#00adee" ui:Translator.TooltipKey="STEAM"
                            Content="/Images/SocialMedia/SteamIcon.png"/>
                    <Button Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://github.com/PixiEditor/PixiEditor"
                            Style="{StaticResource SocialMediaButton}" Tag="Black" ui:Translator.TooltipKey="GITHUB"
                            Content="/Images/SocialMedia/GithubIcon.png"/>
                    <Button Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}" CommandParameter="https://www.youtube.com/channel/UCT5XvyvX1q5PAIaXfWmpsMQ" 
                            Style="{StaticResource SocialMediaButton}" Tag="#FF0000" ui:Translator.TooltipKey="YOUTUBE"
                            Content="/Images/SocialMedia/YouTubeIcon.png"/>
                    <Button Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}"
                            Visibility="{Binding DisplayDonationButton,
                            Converter={BoolToVisibilityConverter}}"
                            CommandParameter="https://opencollective.com/pixieditor"
                            Style="{StaticResource SocialMediaButton}" Tag="#d4af37" ui:Translator.TooltipKey="DONATE"
                            Content="/Images/SocialMedia/DonateIcon.png"/>
                    <Button Command="{cmds:Command PixiEditor.Links.OpenHyperlink, UseProvided=True}"
                            Visibility="{Binding DisplayDonationButton,
                            Converter={InverseBoolToVisibilityConverter}}"
                            CommandParameter="https://store.steampowered.com/app/2435860/PixiEditor__Supporter_Pack/"
                            Style="{StaticResource SocialMediaButton}" Tag="#d4af37" ui:Translator.TooltipKey="BUY_SUPPORTER_PACK"
                            Content="/Images/SocialMedia/DonateIcon.png"/>
                </userControls:AlignableWrapPanel>
        </StackPanel>
    </DockPanel>
</Window>
