<UserControl
    x:Class="Wabbajack.UnderMaintenanceOverlay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
    xmlns:local="clr-namespace:Wabbajack"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    d:DesignHeight="250"
    d:DesignWidth="800"
    mc:Ignorable="d">
    <UserControl.Resources>
        <Color x:Key="YellowColor">#fec701</Color>
        <SolidColorBrush x:Key="YellowBrush" Color="{StaticResource YellowColor}" />
        <Color x:Key="TransparentColor">#AA000000</Color>
        <SolidColorBrush x:Key="TransparentBrush" Color="{StaticResource TransparentColor}" />
        <LinearGradientBrush x:Key="LinesBrush" MappingMode="Absolute" SpreadMethod="Repeat" StartPoint="0,0" EndPoint="48,36">
            <GradientStop Offset="0" Color="Black" />
            <GradientStop Offset="0.5" Color="{StaticResource TransparentColor}" />
            <GradientStop Offset="0.5" Color="{StaticResource YellowColor}" />
            <GradientStop Offset="1" Color="{StaticResource YellowColor}" />
        </LinearGradientBrush>
    </UserControl.Resources>
    <Grid Background="{StaticResource TransparentBrush}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="2*" />
        </Grid.RowDefinitions>
        <Rectangle Grid.Row="0"
            Height="65"
            Fill="{StaticResource LinesBrush}">
            <Rectangle.Effect>
                <DropShadowEffect
                    BlurRadius="15"
                    Opacity="0.7"
                    ShadowDepth="10" />
            </Rectangle.Effect>
        </Rectangle>
        <Grid Grid.Row="1"
            Margin="30"
            Visibility="{Binding ShowHelp, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityConverter}}">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0"
                Margin="0,0,0,10"
                FontFamily="Lucida Sans"
                FontSize="30"
                FontWeight="Bold"
                Foreground="{StaticResource YellowBrush}"
                Text="UNDER MAINTENANCE" />
            <TextBlock Grid.Row="1"
                FontFamily="Lucida Sans"
                FontSize="15"
                FontWeight="Bold"
                Foreground="{StaticResource YellowBrush}"
                Text="When mods are updated and the old versions are taken down, Wabbajack can no longer install the modlist for you. &#x0a; &#x0a;Modlist authors need to download the new mod and confirm its correctness before the modlist can be made available again."
                TextWrapping="WrapWithOverflow" />
        </Grid>
        <Viewbox Grid.Row="1"
            Margin="20"
            VerticalAlignment="Top"
            Visibility="{Binding ShowHelp, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityConverter}, ConverterParameter=False}">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <TextBlock Grid.Row="0"
                    FontFamily="Lucida Sans"
                    FontSize="100"
                    FontWeight="Bold"
                    Foreground="{StaticResource YellowBrush}"
                    Text="UNDER">
                    <TextBlock.Effect>
                        <DropShadowEffect
                            BlurRadius="15"
                            Opacity="0.7"
                            ShadowDepth="10" />
                    </TextBlock.Effect>
                </TextBlock>
                <Button Grid.Row="0"
                    Width="45"
                    Height="45"
                    Margin="0,10"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    Click="Help_Click">
                    <Button.Style>
                        <Style BasedOn="{StaticResource IconBareButtonStyle}" TargetType="Button">
                            <Setter Property="Foreground" Value="{StaticResource YellowBrush}" />
                        </Style>
                    </Button.Style>
                    <icon:PackIconMaterial
                        Width="35"
                        Height="35"
                        Kind="HelpCircle" />
                </Button>
                <TextBlock Grid.Row="1"
                    FontFamily="Lucida Sans"
                    FontSize="100"
                    FontWeight="Bold"
                    Foreground="{StaticResource YellowBrush}"
                    Text="MAINTENANCE">
                    <TextBlock.Effect>
                        <DropShadowEffect
                            BlurRadius="15"
                            Opacity="0.7"
                            ShadowDepth="10" />
                    </TextBlock.Effect>
                </TextBlock>
            </Grid>
        </Viewbox>
    </Grid>
</UserControl>