<Page 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:System="clr-namespace:System;assembly=mscorlib"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:ForzaUI="clr-namespace:ForzaUI"
      x:Name="page"
      x:Class="ForzaUI.Scenes.Anthem.AR_OpponentLabel"
      mc:Ignorable="d"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      Opacity="0">
    <Page.Resources>
        <!-- Do not add resources here.  Woodstock loads 12 of these at once so any resources needed are in Shared_CarLabel.xaml -->
    
        <!-- NOTE: Don't mess with opacities in these storyboards; the codebehind is touching them directly -->
        <Storyboard x:Key="PART_ShowCarLabel">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="page">
                <SplineDoubleKeyFrame KeyTime="0:0:0.333"
                                      Value="1" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="PART_HideCarLabel">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="page">
                <SplineDoubleKeyFrame KeyTime="0:0:0.333"
                                      Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="PART_DetailedCarLabel">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="DetailedOpacity">
                <SplineDoubleKeyFrame KeyTime="0:0:0.333"
                                      Value="1" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="LightweightBackground">
              <LinearDoubleKeyFrame KeyTime="0:0:0.333"
                                    Value="0" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="PART_SimpleCarLabel">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                           Storyboard.TargetName="DetailedOpacity">
                <SplineDoubleKeyFrame KeyTime="0:0:0.333"
                                      Value="0" />
            </DoubleAnimationUsingKeyFrames>
          <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                         Storyboard.TargetName="LightweightBackground">
            <SplineDoubleKeyFrame KeyTime="0:0:0.333"
                                  Value="1" />
          </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        
        <Storyboard x:Key="A_Storyboard_PopStatusBox"
                FillBehavior="HoldEnd">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:BindingProxy.AlwaysValidNumeric)"
                                           Storyboard.TargetName="StatusHeightCalc">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.05"
                                      Value="{StaticResource A_Double_CarLabel_StatusPillContainer_Scale}"
                                      EasingFunction="{local:CubicEase EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="Tag"
                                            Storyboard.TargetName="StatusHeightCalc">
                <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="{StaticResource A_Boolean_True}" />
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="Tag"
                                            Storyboard.TargetName="QuickChatHeightCalc">
                <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="{StaticResource A_Boolean_False}" />
            </BooleanAnimationUsingKeyFrames>

            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                           Storyboard.TargetName="ChatText">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{x:Static Visibility.Collapsed}" />
            </ObjectAnimationUsingKeyFrames>

            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                           Storyboard.TargetName="H2HIcon">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{x:Static Visibility.Collapsed}" />
            </ObjectAnimationUsingKeyFrames>

            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                           Storyboard.TargetName="StatusText">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{x:Static Visibility.Visible}" />
            </ObjectAnimationUsingKeyFrames>

            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{StaticResource A_Style_CarLabel_StatusPill}" />
            </ObjectAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <LinearDoubleKeyFrame KeyTime="0:0:0.03"
                                      Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:2.0"
                                        Value="1" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.Y)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="10" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:2.0"
                                        Value="10" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0.16" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.63"
                                      Value="{StaticResource A_Double_CarLabel_StatusPillContainer_Scale}"
                                      EasingFunction="{local:ElasticEasing EasingMode=EaseOut, Oscillations=2, Springiness=7}" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0.16" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.63"
                                      Value="{StaticResource A_Double_CarLabel_StatusPillContainer_Scale}"
                                      EasingFunction="{local:ElasticEasing EasingMode=EaseOut, Oscillations=2, Springiness=7}" />
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <Storyboard x:Key="A_Storyboard_ClearStatusBox">
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                           Storyboard.TargetName="ChatText">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{x:Static Visibility.Collapsed}" />
            </ObjectAnimationUsingKeyFrames>

            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                           Storyboard.TargetName="StatusText">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{x:Static Visibility.Visible}" />
            </ObjectAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                <EasingDoubleKeyFrame KeyTime="0:0:0.42"
                                      Value="0"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.Y)">
                <EasingDoubleKeyFrame KeyTime="0:0:0.42"
                                      Value="-64"
                                      EasingFunction="{local:QuinticEasing EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)" />
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="ImageSource" />
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)" />
            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                           Storyboard.TargetName="H2HIcon"
                                           BeginTime="0:0:0.42" />

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:BindingProxy.AlwaysValidNumeric)"
                                           Storyboard.TargetName="StatusHeightCalc">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="{StaticResource A_Double_CarLabel_StatusPillContainer_Scale}" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:0.4"
                                        Value="{StaticResource A_Double_CarLabel_StatusPillContainer_Scale}" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.7"
                                      Value="0"
                                      EasingFunction="{local:CubicEasing EasingMode=EaseOut}" />
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:BindingProxy.AlwaysValidNumeric)"
                                           Storyboard.TargetName="QuickChatHeightCalc">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="{StaticResource A_Double_CarLabel_QuickChatPillContainer_Scale}" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.2"
                                      Value="0"
                                      EasingFunction="{local:CubicEase EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>

            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="Tag"
                                            Storyboard.TargetName="StatusHeightCalc">
                <DiscreteBooleanKeyFrame KeyTime="0:0:8" Value="{StaticResource A_Boolean_False}" />
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="Tag"
                                            Storyboard.TargetName="QuickChatHeightCalc">
                <DiscreteBooleanKeyFrame KeyTime="0:0:8" Value="{StaticResource A_Boolean_False}" />
            </BooleanAnimationUsingKeyFrames>

        </Storyboard>

        <local:UIStoryboard x:Key="A_Storyboard_PopChatBox"
                    FillBehavior="HoldEnd">
            <local:UIStoryboard.TriggerAnimation>
                <local:RaiseFzEvent EventName="ChatComplete"
                                    local:TriggerAnimation.KeyTime="0:0:2.42" />
            </local:UIStoryboard.TriggerAnimation>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:BindingProxy.AlwaysValidNumeric)"
                                           Storyboard.TargetName="QuickChatHeightCalc">
                <EasingDoubleKeyFrame KeyTime="0:0:0.0"
                                      Value="{StaticResource A_Double_CarLabel_QuickChatPillContainer_Scale}"
                                      EasingFunction="{local:ExponentialEasing EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="Tag"
                                            Storyboard.TargetName="QuickChatHeightCalc">
                <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="{StaticResource A_Boolean_True}" />
            </BooleanAnimationUsingKeyFrames>
            <BooleanAnimationUsingKeyFrames Storyboard.TargetProperty="Tag"
                                            Storyboard.TargetName="StatusHeightCalc">
                <DiscreteBooleanKeyFrame KeyTime="0:0:0" Value="{StaticResource A_Boolean_False}" />
            </BooleanAnimationUsingKeyFrames>

            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Style">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{StaticResource A_Style_CarLabel_ChatPill}" />
            </ObjectAnimationUsingKeyFrames>

            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                           Storyboard.TargetName="ChatText">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{x:Static Visibility.Visible}" />
            </ObjectAnimationUsingKeyFrames>

            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                           Storyboard.TargetName="StatusText">
                <DiscreteObjectKeyFrame KeyTime="0:0:0"
                                        Value="{x:Static Visibility.Hidden}" />
            </ObjectAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <LinearDoubleKeyFrame KeyTime="0:0:0.03"
                                      Value="1" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:2.0"
                                        Value="1" />
                <EasingDoubleKeyFrame KeyTime="0:0:2.42"
                                      Value="0"
                                      EasingFunction="{local:QuadraticEasing EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(TranslateTransform.Y)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0" />
                <DiscreteDoubleKeyFrame KeyTime="0:0:2.0"
                                        Value="0" />
                <EasingDoubleKeyFrame KeyTime="0:0:2.42"
                                      Value="-64"
                                      EasingFunction="{local:QuinticEasing EasingMode=EaseIn}" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0.16" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.63"
                                      Value="{StaticResource A_Double_CarLabel_QuickChatPillContainer_Scale}"
                                      EasingFunction="{local:ElasticEasing EasingMode=EaseOut, Oscillations=2, Springiness=7}" />
            </DoubleAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
                <DiscreteDoubleKeyFrame KeyTime="0:0:0"
                                        Value="0.16" />
                <EasingDoubleKeyFrame KeyTime="0:0:0.63"
                                      Value="{StaticResource A_Double_CarLabel_QuickChatPillContainer_Scale}"
                                      EasingFunction="{local:ElasticEasing EasingMode=EaseOut, Oscillations=2, Springiness=7}" />
            </DoubleAnimationUsingKeyFrames>

        </local:UIStoryboard>
    </Page.Resources>
    <Grid x:Name="PART_LayoutRoot"
          Opacity="{Binding OpacityOverride}"
          RenderTransformOrigin="0.5,0.5">
        <Grid.RenderTransform>
            <ScaleTransform ScaleX="1.3"
                            ScaleY="1.3" />
        </Grid.RenderTransform>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid>
            <FrameworkElement.Style>
                <Style TargetType="Grid">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding CarLabelSessionMode}"
                                     Value="{x:Static local:CarLabelSessionMode.Rivals}">
                            <Setter Property="Visibility"
                                    Value="Collapsed" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </FrameworkElement.Style>
            <Decorator x:Name="DetailedOpacity" Visibility="{Binding HideSeekShowIconOnly, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                <Grid VerticalAlignment="Bottom"
                      Height="235">
                    <Grid x:Name="TrimSize"
                          Style="{StaticResource A_Style_Grid_CarLabel_LabelHeight}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center">

                        <local:FZMaterial HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Style="{StaticResource A_Style_Framework_Element_Eliminator_Visiblity}">
                            <local:FZMaterial.Preset>
                                <local:FZMaterialPresetRoundtangle BasedOn="{Binding EliminatorCarInfo.CarGrade, Converter={StaticResource A_Converter_Grade_To_Preset}}"
                                                   CornerRadius="8"
                                                   GradientAngle="90" />
                            </local:FZMaterial.Preset>
                        </local:FZMaterial>

                        <StackPanel Orientation="Horizontal"
                                    Height="119"
                                    Margin="4.5">
                            <StackPanel Orientation="Horizontal"
                                x:Name="LeftBoxes">
                                <Decorator x:Name="PrestigeIcon" Visibility="{Binding UserProfile.Wristband, Converter={CompareConverter Value=0, Equal=Collapsed, NotEqual=Visible}}">
                                    <Decorator Visibility="{Binding CarLabelSessionMode, Converter={CompareConverter Value={x:Static local:CarLabelSessionMode.Freeroam}, Equal=Visible, NotEqual=Collapsed}}">
                                        <FZMaterial Color="{StaticResource A_Color_OpponentLabel_FullBackground}"
                                                    Style="{StaticResource A_Style_FZMaterial_GlassPanel_NonInteractive}"
                                                    Visibility="{Binding UserProfile.XP, Converter={StaticResource A_Converter_PrestigeLevelToVisibilityFromXP}, FallbackValue=Collapsed}">
                                            <Grid VerticalAlignment="Center">
                                                <Viewbox VerticalAlignment="Center"
                                                            Margin="17,19,7,11">
                                                    <StackPanel>
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PrestigeIcon}" Color="{StaticResource A_Color_DropShadow}"/>
                                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PrestigeLevel}" Color="{StaticResource A_Color_DropShadow}"
                                                                            Text="{Binding UserProfile.XP, Converter={StaticResource A_XPConverter_Prestige}}" />
                                                    </StackPanel>
                                                </Viewbox>
                                                <Viewbox VerticalAlignment="Center"
                                                            Margin="12,15">
                                                    <StackPanel>
                                                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_PrestigeIcon}" />
                                                        <local:FZTextBlock Style="{StaticResource A_Style_FZTextBlock_PrestigeLevel}"
                                                                            Text="{Binding UserProfile.XP, Converter={StaticResource A_XPConverter_Prestige}}" />
                                                    </StackPanel>
                                                </Viewbox>
                                            </Grid>
                                        </FZMaterial>
                                    </Decorator>
                                </Decorator>
                                <Control Template="{StaticResource A_ControlTemplate_CarLabel_LeftBox}" 
                                         Panel.ZIndex="5" 
                                         x:Name="LeftBox" />
                                <local:FZMaterial HorizontalAlignment="Left" VerticalAlignment="Center" Width="301" Height="120" Stretch="Uniform"
                                                  x:Name="EliminatorLevelBacking" Margin="-4.5,-21.5,-70.5,-13"
                                                  Style="{StaticResource A_Style_Framework_Element_Eliminator_Visiblity}"
                                                  ImageSource="/ForzaUI;component/Textures/Data_Bound/Eliminator/HUD_Label/DriverLabel_LevelBack.png"/>
                            </StackPanel>

                            <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_CarLabelCentre}">
                                <StackPanel Orientation="Horizontal">
                                    <Decorator Width="{Binding ActualWidth, ElementName=TextBox}"/>
                                </StackPanel>
                            </local:FZMaterial>
                            <Control Template="{StaticResource A_ControlTemplate_CarLabel_RightBox}"
                                     x:Name="RightBox" />
                        </StackPanel>
                        
                        <!-- This control copies the size of its parent element. Which forces the parent to stay the same size even when the size of other elements becomes smaller.
                             To mitigate this, make sure that this control doesn't contribute to its parent's size calculation     
                        -->
                        <Decorator Width="0" Height="0">
                            <Control Template="{StaticResource A_Template_Control_CarLabelTrim}"
                                     HorizontalAlignment="Center"
                                     VerticalAlignment="Center"
                                     Width="{Binding ActualWidth, ElementName=TrimSize}"
                                     Height="{Binding ActualHeight, ElementName=TrimSize}"
                                     Visibility="{Binding Interacting, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden_Inverse}}" />
                        </Decorator>

                        <Decorator x:Name="EliminatorLevelPanel" Style="{StaticResource A_Style_Framework_Element_Eliminator_Visiblity}">
                            <local:FZMaterial HorizontalAlignment="Left" VerticalAlignment="Center" Width="200" Height="200" Stretch="Uniform"
                                       Margin="-10,-128,0,-128" ImageSource="{Binding EliminatorCarInfo.CarGrade, Converter={StaticResource A_Converter_HUD_Label_LevelTexture}}" />
                        </Decorator>

                        <local:FZMaterial Color="{StaticResource A_Color_Interaction_Activated}"
                                          Visibility="{Binding Interacting, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}">
                            <local:FZMaterial.Preset>
                                <local:FZMaterialPresetGlassRoundtangleStroke
                                    Thickness="{StaticResource A_Thickness_CarLabel_Trim}"
                                    CornerRadius="{StaticResource A_CornerRadius_CarLabel_Trim}" />
                            </local:FZMaterial.Preset>
                        </local:FZMaterial>
                    </Grid>

                    <StackPanel HorizontalAlignment="Center"
                                VerticalAlignment="Bottom"
                                Margin="0,0,0,185"
                                Orientation="Horizontal">
                        <local:FZMaterial
                                  Width="220"
                                  Height="220"
                                  Stretch="UniformToFill"
                                  VerticalAlignment="Bottom"
                                  Margin="5,0,5,0"
                                  Style="{StaticResource A_Style_FZMaterial_CarLabel_H2HIcon}"
                                  x:Name="H2HIcon" />
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/Anthem/Icons/HVTIcon.png"
                                  Width="220"
                                  Height="220"
                                  Stretch="UniformToFill"
                                  VerticalAlignment="Bottom"
                                  Margin="5,0,5,0"
                                          Visibility="{Binding IsHighValueTarget, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                          x:Name="HVTIcon" />
                    </StackPanel>

                    <StackPanel HorizontalAlignment="Center"
                                VerticalAlignment="Bottom">
                        <local:FZMaterial ImageSource="/ForzaUI;component/Textures/Data_Bound/Promo/Opponent_Label/photo_collection.png"
                                          Style="{StaticResource A_Style_FZMaterial_CarLabel_PhotoNeededIcon}"
                                          Width="100"
                                          Height="100"
                                          x:Name="PhotoIcon" />
                        <Grid MinHeight="50">
                            <Decorator Style="{StaticResource A_Style_FrameworkElement_StatusPillHeightHelper}"
                                       Margin="0,6,0,0"
                                       x:Name="QuickChatHeightCalc" />

                            <Decorator Style="{StaticResource A_Style_FrameworkElement_StatusPillHeightHelper}"
                                       x:Name="StatusHeightCalc" />
                        </Grid>
                        <Decorator Height="135" />
                    </StackPanel>

                    <StackPanel HorizontalAlignment="Center"
                                VerticalAlignment="Bottom">
                        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_CarLabel_MultiplayerBuildingIcon}"
                                          Width="100"
                                          Height="100"
                                          x:Name="MultiplayerBuildingIcon" />
                        <Decorator Height="185" />
                    </StackPanel>

                    <local:FZMaterial HorizontalAlignment="Center"
                                      MinWidth="300"
                                      RenderTransformOrigin="0.5,1"
                                      Opacity="0"
                                      Style="{StaticResource A_Style_CarLabel_StatusPill}"
                                      x:Name="StatusPill">
                        <FZMaterial.RenderTransform>
                            <TransformGroup>
                                <ScaleTransform />
                                <TranslateTransform />
                            </TransformGroup>
                        </FZMaterial.RenderTransform>
                        <Grid>
                            <local:FZTextBlock Text="{Binding StatusText}"
                                               x:Name="StatusText"
                                               Color="#FFFFFF"
                                               Style="{StaticResource A_Style_CarLabel_StatusText}" />
                            <local:FZTextBlock Text="{Binding ChatText}"
                                               Style="{StaticResource A_Style_CarLabel_QuickChat}"
                                               x:Name="ChatText" 
                                               Visibility="Collapsed"/>
                        </Grid>
                    </local:FZMaterial>

                    <local:FZMaterial VerticalAlignment="Bottom"
                                      Width="164"
                                      Height="164"
                                      Margin="0,0,0,-80"
                                      ImageSource="/ForzaUI;component/Textures/Anthem/Icons/Spatial/Driverlabel/Arrow.png" />
                </Grid>

            </Decorator>
            
            <Grid VerticalAlignment="Bottom"
                  Height="235">
                <Grid HorizontalAlignment="Center"
                      VerticalAlignment="Center">
                    <StackPanel Orientation="Horizontal"
                                Height="128"
                                Margin="7.5">
                        <Decorator Width="{Binding ActualWidth, ElementName=LeftBoxes}" />
                        <Decorator x:Name="TextBox" >
                            <Grid Style="{StaticResource A_Style_Grid_OpponentText_Container}">
                                <local:FZMaterial x:Name="LightweightBackground" 
                                                Preset="{StaticResource A_FZMaterialPresetGlass_LightweightCarLabelBackground_WithoutDepthTest}" 
                                                Opacity="0"
                                                Color="{StaticResource A_Color_OpponentLabel_LightweightBackground}" 
                                                Style="{StaticResource A_Style_FZMaterial_LightweightBackground}"/>
                                <StackPanel Orientation="Horizontal" Style="{StaticResource A_Style_StackPanel_CarLabel_TextBox}">
                                    <Grid>
                                        <local:FZMaterial Width="150" Height="150" 
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        ImageSource="/ForzaUI;component/Textures/Data_Bound/Hide_Seek/Car_Selection/hider_car_icon.png"
                                        Visibility="{Binding HideSeekPingActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                            <local:FZMaterial.Preset>
                                                <local:FZMaterialPreset DepthTest="{Binding IsLightweightLabelFeatureEnabled, Converter={StaticResource A_Converter_Boolean_Invert}}" />
                                            </local:FZMaterial.Preset>
                                        </local:FZMaterial>
                                        <local:FZMaterial Width="150" Height="150" Margin="0,10"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        ImageSource="/ForzaUI;component/Textures/Data_Bound/Hide_Seek/Car_Selection/chase_break_icon.png"
                                        Visibility="{Binding HideSeekChaseBreakerActive, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                            <local:FZMaterial.Preset>
                                                <local:FZMaterialPreset DepthTest="{Binding IsLightweightLabelFeatureEnabled, Converter={StaticResource A_Converter_Boolean_Invert}}" />
                                            </local:FZMaterial.Preset>
                                        </local:FZMaterial>
                                    </Grid>
                                    <Grid Visibility="{Binding HideSeekShowIconOnly, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                        <local:FZTextBlock Style="{StaticResource A_Style_CarLabel_OpponentTag}"
                                                            Text="{Binding UserProfile.FormattedGamertag}"
                                                            Color="{StaticResource A_Color_DropShadow}"
                                                            Margin="7,7,0,0">
                                            <local:FZTextBlock.Preset>
                                                <local:FZMaterialPreset DepthTest="{Binding IsLightweightLabelFeatureEnabled, Converter={StaticResource A_Converter_Boolean_Invert}}" />
                                            </local:FZTextBlock.Preset>
                                        </local:FZTextBlock>
                                        <local:FZTextBlock Style="{StaticResource A_Style_CarLabel_OpponentTag}"
                                                        Text="{Binding UserProfile.FormattedGamertag}">
                                            <local:FZTextBlock.Preset>
                                                <local:FZMaterialPreset DepthTest="{Binding IsLightweightLabelFeatureEnabled, Converter={StaticResource A_Converter_Boolean_Invert}}" />
                                            </local:FZTextBlock.Preset>
                                        </local:FZTextBlock>
                                    </Grid>
                                    <Decorator Visibility="{Binding HideSeekShowIconOnly, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                        <local:PlayerAdornmentControl Margin="4,0,0,0" 
                                                                      Style="{StaticResource A_Style_PlayerAdornmentControl_CarLabel}"
                                                                      BadgeId="{Binding UserProfile.BadgeId}"/>
                                    </Decorator>
                                </StackPanel>
                            </Grid>
                        </Decorator>
                        <Decorator Width="{Binding ActualWidth, ElementName=RightBox}" Visibility="{Binding Visibility, ElementName=RightBox}"/>
                    </StackPanel>
                </Grid>
            </Grid>
        </Grid>
        <!-- uncomment the code bellow to test this scene with the 'OpponentLabel' mimic scene -->
        <!-- <Decorator x:Name="TestSceneDescription"
                   Style="{StaticResource A_Style_Decorator_DebugCarLabelDescription}"
                   MaxWidth="800">
            <local:FZMaterial x:Name="Background"
                              Color="{StaticResource H_Color_Primary_Purple}"
                              VerticalAlignment="Center"
                              HorizontalAlignment="Center">
                <StackPanel Orientation="Vertical">
                    <local:FZTextBlock x:Name="SceneDescrition"
                                    Text="{Binding DebugLabelDescription, Converter={StaticResource A_StringToUpper}}"
                                    Margin="10"
                                    TextWrapping="Wrap"
                                    TextAlignment="Center"
                                    FontSize="20"
                                    MaxHeight="100"
                                    Color="{StaticResource H_Color_Primary_White}"
                                    FontFamily="Horizon_A"
                                    HorizontalAlignment="Center"
                                    VerticalAlignment="Center" />
                    <local:FZTextBlock x:Name="ExpectedResultsAndInstructions"
                                    Text="{Binding DebugLabelExpectedOutcome, Converter={StaticResource A_StringToUpper}}"
                                    Margin="8,0,8,10"
                                    TextWrapping="Wrap"
                                    TextAlignment="Left" 
                                    FontSize="18"
                                    MaxHeight="270"
                                    Color="{StaticResource H_Color_Primary_White}"
                                    FontFamily="Horizon_A"/>
                </StackPanel>
            </local:FZMaterial>
        </Decorator> -->
    </Grid>
    <local:EventFire.FzTriggers>
        <local:BeginUIStoryboard local:EventFireTrigger.Event="NewChat"
                                 x:Name="NewChat"
                                 local:EventFireTrigger.TargetName="StatusPill"
                                 Storyboard="{StaticResource A_Storyboard_PopChatBox}" />
        <local:BeginUIStoryboard local:EventFireTrigger.Event="NewStatus"
                                 x:Name="NewStatus"
                                 local:EventFireTrigger.TargetName="StatusPill"
                                 Storyboard="{StaticResource A_Storyboard_PopStatusBox}" />
        <StopStoryboard local:EventFireTrigger.Event="NewStatus"
                        local:EventFireTrigger.TargetName="StatusPill"
                        BeginStoryboardName="NewChat" />
        <local:BeginUIStoryboard local:EventFireTrigger.Event="ClearStatus"
                                 local:EventFireTrigger.TargetName="StatusPill"
                                 Storyboard="{StaticResource A_Storyboard_ClearStatusBox}" />
    </local:EventFire.FzTriggers>
</Page>
