<UserControl x:Class="Hearthstone_Deck_Tracker.Windows.MainWindowControls.HsReplayDeckInfoView"
             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:Hearthstone_Deck_Tracker.Windows.MainWindowControls"
             xmlns:wpf="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             xmlns:lex="http://wpflocalizeextension.codeplex.com"
             mc:Ignorable="d" Name="DeckInfoControl"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <Storyboard x:Key="NoDataStoryboard">
            <DoubleAnimation Storyboard.TargetProperty="Height" To="40" Duration="0:0:0.2"/>
        </Storyboard>
        <Storyboard x:Key="HasDataStoryboard">
            <DoubleAnimation Storyboard.TargetProperty="Height" To="160" Duration="0:0:0.2"/>
        </Storyboard>
    </UserControl.Resources>
    <UserControl.DataContext>
        <local:HsReplayDeckInfoViewModel/>
    </UserControl.DataContext>
    <Grid Height="40">
        <Grid.Style>
            <Style>
                <Style.Triggers>
                    <DataTrigger Binding="{Binding HasHsReplayData}" Value="True">
                        <DataTrigger.EnterActions>
                            <StopStoryboard BeginStoryboardName="NoData"/>
                            <BeginStoryboard Name="HasData" Storyboard="{StaticResource HasDataStoryboard}"/> 
                        </DataTrigger.EnterActions>
                        <DataTrigger.ExitActions>
                            <StopStoryboard BeginStoryboardName="HasData"/>
                            <BeginStoryboard Name="NoData" Storyboard="{StaticResource NoDataStoryboard}"/> 
                        </DataTrigger.ExitActions>
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </Grid.Style>
        <StackPanel VerticalAlignment="Top" Visibility="{Binding HasHsReplayData, Converter={StaticResource BoolToVisibility}}">
            <Border Height="105" Visibility="{Binding Loading, Converter={StaticResource BoolToVisibility}}">
                <TextBlock Text="{lex:LocTextUpper HsReplayDeckInfo_Label_Loading}" Foreground="Gray" VerticalAlignment="Center" TextAlignment="Center" />
            </Border>
            <StackPanel Height="105" Orientation="Horizontal" HorizontalAlignment="Center" Visibility="{Binding Loading, Converter={StaticResource InverseBoolToVisibility}}">
                <Grid VerticalAlignment="Center" Margin="0,15,0,0">
                    <TextBlock Style="{StaticResource WinrateGaugeTextStyle}">
                        <Run Text="{Binding MatchupData.Total, Mode=OneWay}"/>%
                        <LineBreak/>
                        <Run Text="{lex:LocTextUpper DeckCharts_Label_Winrate}" FontSize="10"/>
                    </TextBlock>
                    <wpf:Gauge Value="{Binding MatchupData.TotalValue, Mode=OneWay}" Style="{StaticResource WinrateGaugeStyle}"/>
                </Grid>
                <StackPanel Margin="10,0,0,0">
                    <TextBlock Text="{lex:LocTextUpper HsReplayDeckInfo_Label_Machtups}" FontWeight="SemiBold" TextAlignment="Center"/>
                    <UniformGrid Width="230" Margin="0,5,0,0">
                        <UniformGrid.Resources>
                            <Style TargetType="Image">
                                <Setter Property="Width" Value="24"/>
                                <Setter Property="Height" Value="24"/>
                                <Setter Property="RenderOptions.BitmapScalingMode" Value="Fant"/>
                            </Style>
                            <Style TargetType="StackPanel">
                                <Setter Property="Orientation" Value="Horizontal"/>
                                <Setter Property="Margin" Value="4,2,0,0"/>
                            </Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="VerticalAlignment" Value="Center"/>
                                <Setter Property="FontWeight" Value="SemiBold"/>
                                <Setter Property="Margin" Value="3,0,0,0"/>
                            </Style>
                        </UniformGrid.Resources>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconDeathknightRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Deathknight, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconDemonHunterRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.DemonHunter, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconDruidRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Druid, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconHunterRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Hunter, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconMageRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Mage, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconPaladinRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Paladin, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconPriestRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Priest, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconRogueRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Rogue, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconShamanRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Shaman, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconWarlockRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Warlock, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                        <StackPanel>
                            <Image Source="{StaticResource ClassIconWarriorRound}"/>
                            <TextBlock>
                                <Run Text="{Binding MatchupData.Warrior, Mode=OneWay}"/>%
                            </TextBlock>
                        </StackPanel>
                    </UniformGrid>
                </StackPanel>
                <StackPanel VerticalAlignment="Center">
                </StackPanel>
                <Grid></Grid>
            </StackPanel>
            <Button Name="BtnHsReplayDeckDetail" Height="40" Width="320" Margin="0,10,0,0"
                Style="{StaticResource SquareButtonStyle}" Command="{Binding OpenDeckPageCommand}">
                <DockPanel HorizontalAlignment="Center">
                    <Image Source="{DynamicResource HsReplayIcon}"
                        Height="24" RenderOptions.BitmapScalingMode="Fant"
                        DockPanel.Dock="Left" Margin="0,0,8,0"/>
                    <TextBlock VerticalAlignment="Center" FontWeight="SemiBold" Text="{lex:LocTextUpper HsReplayDeckInfo_Button_DeckStatistics}" />
                </DockPanel>
            </Button>
        </StackPanel>
        <StackPanel Visibility="{Binding HasHsReplayData, Converter={StaticResource InverseBoolToVisibility}}" VerticalAlignment="Center">
            <StackPanel.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="Foreground" Value="Gray"/>
                    <Setter Property="TextAlignment" Value="Center"/>
                </Style>
            </StackPanel.Resources>
            <TextBlock Text="{lex:Loc HsReplayDeckInfo_Label_NoData}" Visibility="{Binding HasDeck, Converter={StaticResource BoolToVisibility}}"/>
            <TextBlock Text="{lex:Loc HsReplayDeckInfo_Label_NoSelectedDeck}" Visibility="{Binding HasDeck, Converter={StaticResource InverseBoolToVisibility}}"/>
            <TextBlock>
                <Run Text="{lex:Loc HsReplayDeckInfo_Label_TrendingDecksPre}" />
                <Hyperlink Command="{Binding OpenTrendingDecksCommand}">
                    <Run Text="{lex:Loc HsReplayDeckInfo_Hyperlink_TrendingDecks}"/>
                </Hyperlink>
            </TextBlock>
        </StackPanel>
    </Grid>
</UserControl>
