<Window xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:vm="using:LOLRLCG.ViewModels"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:system="clr-namespace:System;assembly=System.Runtime"
        mc:Ignorable="d" d:DesignWidth="{StaticResource Width}" d:DesignHeight="{StaticResource Height}"
        x:Class="LOLRLCG.Views.MainWindow"
        x:DataType="vm:MainWindowViewModel"
        Icon="/Assets/avalonia-logo.ico"
        Title="LOLRLCG"
        Width="{StaticResource Width}"
        Height="{StaticResource Height}"
        TransparencyLevelHint="Transparent"
        Background="Transparent"
        TransparencyBackgroundFallback="DimGray"
        ExtendClientAreaToDecorationsHint="True"
        CanResize="False"
        WindowStartupLocation="CenterScreen"
        Topmost="True"
        >

    <Window.Resources>
        <system:Double x:Key="Width">640</system:Double>
        <system:Double x:Key="Height">360</system:Double>
    </Window.Resources>

    <Design.DataContext>
        <!-- This only sets the DataContext for the previewer in an IDE,
             to set the actual DataContext for runtime, set the DataContext property in code (look at App.axaml.cs) -->
        <vm:MainWindowViewModel/>
    </Design.DataContext>
    <Panel Background="Transparent">
        <TextBlock ZIndex="2" Background="rgba(0,0,0,0.2)" Foreground="White" VerticalAlignment="Top" HorizontalAlignment="Stretch" TextAlignment="Center" Text="League of Legends Random Lane and Champion Generator" Height="30" Padding="0,7,0,0"/>
        <Image ZIndex="0" Source="avares://LOLRLCG/Resources/background.png" Width="{StaticResource Width}" Height="{StaticResource Height}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"/>
        <Border ZIndex="1" Margin="20, 40" Background="rgba(0, 0, 0, 0.6)" CornerRadius="7.5">
            <Grid Margin="10">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <!-- Champion Visualisation -->
                <StackPanel Grid.Column="0">
                    <StackPanel Background="#000000ff">
                        <TextBlock Foreground="rgb(200,200,200)" Text="Champion: "></TextBlock>
                        <TextBlock Foreground="White" Text="{Binding SelectedChampion.Name}"></TextBlock>
                    </StackPanel>
                    <StackPanel Margin="0,10,0,0">
                        <TextBlock Foreground="rgb(200,200,200)" Text="Lane: "></TextBlock>
                        <TextBlock Foreground="White" Text="{Binding Lane}"></TextBlock>
                    </StackPanel>
                    <Image Source="{Binding SelectedChampion.ImageBitmap}" VerticalAlignment="Center" HorizontalAlignment="Center" Width="150" Height="150"></Image>
                </StackPanel>
                <!-- Possibility Settings -->
                <StackPanel Grid.Column="1">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="40"></ColumnDefinition>
                            <ColumnDefinition Width="*"></ColumnDefinition>
                            <ColumnDefinition Width="40"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                            <RowDefinition Height="*"></RowDefinition>
                        </Grid.RowDefinitions>
                        <TextBlock Grid.Column="0" Grid.Row="0" Text="Top" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        <Slider Grid.Column="1" Grid.Row="0" Value="{Binding TopPercentage}" Minimum="0" Maximum="100" Margin="10,0,10,0" Orientation="Horizontal"/>
                        <TextBlock Grid.Column="2" Grid.Row="0" Text="{Binding TopPercentage}" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        
                        <TextBlock Grid.Column="0" Grid.Row="1" Text="Mid" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        <Slider Grid.Column="1" Grid.Row="1" Value="{Binding MidPercentage}" Minimum="0" Maximum="100" Margin="10,0,10,0" Orientation="Horizontal"/>
                        <TextBlock Grid.Column="2" Grid.Row="1" Text="{Binding MidPercentage}" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        
                        <TextBlock Grid.Column="0" Grid.Row="2" Text="Jgl" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        <Slider Grid.Column="1" Grid.Row="2" Value="{Binding JglPercentage}" Minimum="0" Maximum="100" Margin="10,0,10,0" Orientation="Horizontal"/>
                        <TextBlock Grid.Column="2" Grid.Row="2" Text="{Binding JglPercentage}" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        
                        <TextBlock Grid.Column="0" Grid.Row="3" Text="Bot" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        <Slider Grid.Column="1" Grid.Row="3" Value="{Binding BotPercentage}" Minimum="0" Maximum="100" Margin="10,0,10,0" Orientation="Horizontal"/>
                        <TextBlock Grid.Column="2" Grid.Row="3" Text="{Binding BotPercentage}" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        
                        <TextBlock Grid.Column="0" Grid.Row="4" Text="Sup" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                        <Slider Grid.Column="1" Grid.Row="4" Value="{Binding SupPercentage}" Minimum="0" Maximum="100" Margin="10,0,10,0" Orientation="Horizontal"/>
                        <TextBlock Grid.Column="2" Grid.Row="4" Text="{Binding SupPercentage}" Foreground="White" TextAlignment="Center" VerticalAlignment="Center"></TextBlock>
                    </Grid>
                </StackPanel>
                <Button Grid.Column="0" Grid.ColumnSpan="2" Margin="0,0,0,-25" Foreground="White" Content="Get Random Champion" Command="{Binding getRandomChampionLaneComboCommand}" IsEnabled="{Binding ChampionList.Count}" HorizontalAlignment="Center" VerticalAlignment="Bottom"/>
            </Grid>
        </Border>
        <StackPanel Margin="5,0" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" Orientation="Horizontal">
            <TextBlock Grid.Column="1" VerticalAlignment="Bottom" FontSize="10" Foreground="rgba(200,200,200, 0.3)" Text="League Client Version: "></TextBlock>
            <TextBlock Grid.Column="1" VerticalAlignment="Bottom" FontSize="10" Foreground="rgba(200,200,200, 0.3)" Text="{Binding LeagueClientVersion}"></TextBlock>
        </StackPanel>
    </Panel>
</Window>
