<UserControl
    x:Class="Ryujinx.Ava.UI.Views.Dialog.AboutView"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModel="clr-namespace:Ryujinx.Ava.UI.ViewModels"
    xmlns:interopServices="clr-namespace:System.Runtime.InteropServices;assembly=System.Runtime"
    MinWidth="550"
    MinHeight="260"
    MaxWidth="600"
    MaxHeight="500"
    Margin="0,-12,0,0"
    d:DesignHeight="260"
    d:DesignWidth="550"
    x:DataType="viewModel:AboutWindowViewModel"
    Focusable="True"
    mc:Ignorable="d">
    <Design.DataContext>
        <viewModel:AboutWindowViewModel />
    </Design.DataContext>
    <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ColumnDefinitions="Auto,Auto,*">
        <Grid
            Grid.Column="0"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch" RowDefinitions="Auto,*,Auto">
            <StackPanel
                Grid.Row="0"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                Spacing="10">
                <Grid ColumnDefinitions="Auto,*,Auto">
                    <StackPanel
                        Grid.Column="1"
                        Orientation="Horizontal"
                        HorizontalAlignment="Center"
                        Spacing="10">
                        <Image
                            Height="90"
                            Width="90"
                            Source="resm:Ryujinx.Assets.UIImages.Logo_Ryujinx.png?assembly=Ryujinx"
                            HorizontalAlignment="Center"
                            IsHitTestVisible="True" />
                        <WrapPanel
                            HorizontalAlignment="Right"
                            VerticalAlignment="Center"
                            Orientation="Vertical">
                            <TextBlock
                                FontSize="28"
                                FontWeight="Bold"
                                Text="Ryujinx"
                                TextAlignment="Start"
                                Width="110"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center" />
                            <TextBlock
                                FontSize="11"
                                Text="(REE-YOU-JINX)"
                                TextAlignment="Start"
                                Width="110"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center" />
                        </WrapPanel>
                    </StackPanel>
                </Grid>
                <TextBlock
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    FontSize="10"
                    LineHeight="12"
                    Text="{Binding Version}"
                    TextAlignment="Center" />
                <TextBlock
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    FontSize="10"
                    LineHeight="12"
                    Text="{x:Static interopServices:RuntimeInformation.FrameworkDescription}"
                    TextAlignment="Center" />
                <Border
                    Height="1"
                    Margin="0,20, 0, 20"
                    HorizontalAlignment="Stretch"
                    BorderBrush="{DynamicResource ThemeControlBorderColor}"
                    BorderThickness="0,1,0,0" />
            </StackPanel>
            <StackPanel
                Grid.Row="2"
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                Spacing="10">
                <TextBlock
                    Width="200"
                    HorizontalAlignment="Center"
                    FontSize="10"
                    LineHeight="12"
                    Text="{ext:Locale AboutDisclaimerMessage}"
                    TextAlignment="Center"
                    TextWrapping="Wrap" />
                <TextBlock
                    Name="AmiiboLabel"
                    Width="200"
                    HorizontalAlignment="Center"
                    FontSize="10"
                    LineHeight="12"
                    PointerPressed="AmiiboLabel_OnPointerPressed"
                    Text="{ext:Locale AboutAmiiboDisclaimerMessage}"
                    TextAlignment="Center"
                    TextWrapping="Wrap" />
                <StackPanel
                    HorizontalAlignment="Center"
                    Orientation="Horizontal"
                    Spacing="10">
                    <Button Name="GitRepoButton"
                        MinWidth="30"
                        MinHeight="30"
                        MaxWidth="30"
                        MaxHeight="30"
                        Padding="8"
                        Background="Transparent"
                        Click="Button_OnClick"
                        CornerRadius="15"
                        Tag="https://src.ryujinx.app"
                        ToolTip.Tip="{ext:Locale AboutForgejoUrlTooltipMessage}">
                        <Image Source="{Binding ForgejoLogo}" />
                    </Button>
                    <Button
                        MinWidth="30"
                        MinHeight="30"
                        MaxWidth="30"
                        MaxHeight="30"
                        Padding="8"
                        Background="Transparent"
                        Click="Button_OnClick"
                        CornerRadius="15"
                        Tag="https://discord.gg/PEuzjrFXUA"
                        ToolTip.Tip="{ext:Locale AboutDiscordUrlTooltipMessage}">
                        <Image Source="{Binding DiscordLogo}" />
                    </Button>
                </StackPanel>
            </StackPanel>
        </Grid>
        <Border
            Grid.Column="1"
            Width="1"
            Margin="20,0"
            VerticalAlignment="Stretch"
            BorderBrush="{DynamicResource ThemeControlBorderColor}"
            BorderThickness="1,0,0,0" />
        <Grid
            Grid.Column="2"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch" RowDefinitions="Auto,Auto,Auto">
            <StackPanel
                Grid.Row="0"
                Spacing="2">
                <TextBlock
                    Classes="h1"
                    FontWeight="Bold"
                    Text="{ext:Locale AboutRyujinxAboutTitle}" />
                <TextBlock
                    Text="{ext:Locale AboutRyujinxAboutContent}"
                    TextWrapping="Wrap" />
            </StackPanel>
            <Separator Grid.Row="1" Margin="0,20" />
            <StackPanel
                Grid.Row="2"
                Spacing="2">
                <TextBlock
                    Classes="h1"
                    FontWeight="Bold"
                    Text="{ext:Locale AboutRyujinxMaintainersTitle}" />
                <TextBlock
                    Margin="0, 0, 0, 5"
                    TextWrapping="Wrap"
                    Text="{Binding Developers}"/>
                <TextBlock
                    Classes="h1"
                    FontWeight="Bold"
                    Text="{ext:Locale AboutRyujinxFormerMaintainersTitle}" />
                <TextBlock
                    FontSize="11"
                    Text="{Binding FormerDevelopers}"
                    TextWrapping="Wrap" />
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
