<UserControl x:Class="UniGetUI.Avalonia.Views.Pages.AboutPages.AboutPage"
             xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:automation="clr-namespace:Avalonia.Automation;assembly=Avalonia.Controls"
             xmlns:vm="using:UniGetUI.Avalonia.ViewModels.Pages.AboutPages"
             xmlns:t="using:UniGetUI.Avalonia.MarkupExtensions"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             mc:Ignorable="d"
             x:DataType="vm:AboutPageViewModel">

    <ScrollViewer HorizontalScrollBarVisibility="Disabled">
        <StackPanel Orientation="Vertical" Spacing="4" Margin="16,8">

            <TextBlock Text="{t:Translate About UniGetUI}"
                       FontFamily="Segoe UI Variable Display"
                       FontSize="24"
                       FontWeight="Bold"/>

            <TextBlock Text="{t:Translate UniGetUI by Devolutions}"
                       FontSize="14"
                       FontWeight="SemiBold"
                       Opacity="0.75"
                       Margin="0,-4,0,4"/>

            <TextBlock Text="{t:Translate Text='UniGetUI is an application that makes managing your software easier, by providing an all-in-one graphical interface for your command-line package managers.'}"
                       FontSize="14"
                       TextWrapping="Wrap"/>

            <SelectableTextBlock Text="{Binding VersionText}"
                       FontSize="15"
                       FontWeight="SemiBold"
                       Margin="0,10"/>

            <!-- Disclaimer banner -->
            <Border Classes="warning-banner"
                    CornerRadius="8"
                    Padding="12,10"
                    Margin="0,6">
                <Grid ColumnDefinitions="Auto,*">
                    <!-- Warning icon -->
                    <Border Grid.Column="0"
                            Width="26" Height="26"
                            CornerRadius="13"
                            Background="{DynamicResource WarningBannerIconBackground}"
                            VerticalAlignment="Top"
                            Margin="0,1,12,0">
                        <TextBlock Text="!"
                                   FontWeight="Bold"
                                   FontSize="15"
                                   HorizontalAlignment="Center"
                                   VerticalAlignment="Center"/>
                    </Border>
                    <!-- Text -->
                    <StackPanel Grid.Column="1" Spacing="4">
                        <TextBlock Text="{Binding DisclaimerTitle}"
                                   FontSize="14"
                                   FontWeight="SemiBold"/>
                        <TextBlock Text="{Binding DisclaimerMessage}"
                                   FontSize="14"
                                   TextWrapping="Wrap"/>
                    </StackPanel>
                </Grid>
            </Border>

            <TextBlock Text="{t:Translate Useful links}"
                       FontFamily="Segoe UI Variable Display"
                       FontSize="24"
                       FontWeight="Bold"
                       Margin="0,10,0,4"/>

            <Button Command="{Binding OpenHomepageCommand}"
                    Background="Transparent"
                    BorderThickness="0"
                    Padding="0"
                    HorizontalAlignment="Center"
                    automation:AutomationProperties.Name="{t:Translate UniGetUI Homepage}">
                <TextBlock Classes="hyperlink"
                           FontSize="14"
                           Text="{t:Translate UniGetUI Homepage}"
                           automation:AutomationProperties.AccessibilityView="Raw"/>
            </Button>

            <Button Command="{Binding OpenIssuesCommand}"
                    Background="Transparent"
                    BorderThickness="0"
                    Padding="0"
                    HorizontalAlignment="Center"
                    automation:AutomationProperties.Name="{t:Translate Report an issue or submit a feature request}">
                <TextBlock Classes="hyperlink"
                           FontSize="14"
                           Text="{t:Translate Report an issue or submit a feature request}"
                           automation:AutomationProperties.AccessibilityView="Raw"/>
            </Button>

            <Button Command="{Binding OpenRepositoryCommand}"
                    Background="Transparent"
                    BorderThickness="0"
                    Padding="0"
                    HorizontalAlignment="Center"
                    automation:AutomationProperties.Name="{t:Translate UniGetUI Repository}">
                <TextBlock Classes="hyperlink"
                           FontSize="14"
                           Text="{t:Translate UniGetUI Repository}"
                           automation:AutomationProperties.AccessibilityView="Raw"/>
            </Button>

        </StackPanel>
    </ScrollViewer>

</UserControl>
