<UserControl
    DataContext="{Binding (HUDData.Data), RelativeSource={RelativeSource Self}}"
    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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:ForzaUI" 
    xmlns:System="clr-namespace:System;assembly=mscorlib"
    mc:Ignorable="d"
    x:Class="ForzaUI.NotificationPopupControl">

    <UserControl.Resources>

        <System:Double x:Key="A_Double_NotificationPopup_MinHeight">96</System:Double>
        <System:Double x:Key="A_Double_NotificationPopup_MinWidth">380</System:Double>
        <System:Double x:Key="A_Double_NotificationPopup_ContentMinHeight">74</System:Double>
        <System:Double x:Key="A_Double_NotificationPopup_MaxWidth">760</System:Double>
        <System:Double x:Key="A_Double_NotificationPopup_MaxWidthWithSideIcon">856</System:Double>

        <System:Double x:Key="A_Double_NotificationPopup_Unsupported_AutoDrive_Msg_MaxWidth">600</System:Double>

        <Size x:Key="A_Size_Notification_GamerPicSizeParams">208,208</Size>

        <local:FZMaterialPresetRoundtangle x:Key="A_FZMaterialPresetRoundtangle_Notification_RoundLeft"
            CornerRadius="7,2,2,7"/>
      
      <FZMaterialPresetRoundtangle x:Key="A_FZMaterialPreset_softDropShadow"
                                   Softness="5"
                                   Unlit="True" >
      </FZMaterialPresetRoundtangle>
      
      <Style x:Key="A_Style_FZMaterial_Notifaction_Preset" TargetType="{x:Type local:FZMaterial}">
        <Setter Property="Preset" Value="{StaticResource H_Roundtangle_LeftOnly_3px}"/>
        <Style.Triggers>
          <DataTrigger Binding="{Binding IsStuntParty}" Value="True">
            <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_Notification_RoundLeft}"/>
          </DataTrigger>
          <DataTrigger Binding="{Binding IsEliminator}" Value="True">
            <Setter Property="Preset" Value="{StaticResource A_FZMaterialPresetRoundtangle_Notification_RoundLeft}"/>
          </DataTrigger>
        </Style.Triggers>
      </Style>
      
      <Style x:Key="A_Style_ProgressBar_NotificationSpinner" TargetType="ProgressBar" BasedOn="{StaticResource A_Style_ProgressBar_WaitSpinnerDark}">
            <Style.Resources>
                <System:Double x:Key="A_Double_LoadingSpinner_DotRadius_Dynamic">0.3</System:Double>
                <System:Double x:Key="A_Double_LoadingSpinner_OrbitRadius_Dynamic">0.7</System:Double>
            </Style.Resources>
            <Style.Setters>
                <Setter Property="Width" Value="24" />
                <Setter Property="Height" Value="24" />
                <Setter Property="Margin" Value="0,0,10,0"/>
                <Setter Property="HorizontalAlignment" Value="Left" />
                <Setter Property="VerticalAlignment" Value="Center" />
                <Setter Property="IsIndeterminate" Value="True"/>
                <Setter Property="Tag" Value="{StaticResource H_Color_Primary_Black}" />
            </Style.Setters>
        </Style>

        <Storyboard x:Key="A_Storyboard_Notification_Show_FzEvents" />
        <Storyboard x:Key="A_Storyboard_Notification_Hide_FzEvents" >
            <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:EventFire.EventName)" 
                                           Storyboard.TargetName="{x:Null}"
                                           FillBehavior="Stop">
                <DiscreteStringKeyFrame KeyTime="0:0:0.0" Value=""/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.2" Value="HiddenComplete"/>
                <DiscreteStringKeyFrame KeyTime="0:0:0.3" Value=""/>
            </StringAnimationUsingKeyFrames>
        </Storyboard>

        <Style x:Key="A_Style_FrameworkElement_Notification" TargetType="{x:Type FrameworkElement}">
            <Setter Property="local:BindingProxy.TunnelOut"
                    Value="{Binding A, Source={StaticResource A_GlobalStorageValue_NotificationPopupHeight}, Mode=OneWayToSource}" />
            <Setter Property="MinHeight" Value="{StaticResource A_Double_NotificationPopup_MinHeight}"/>
            <Setter Property="MaxWidth" Value="{StaticResource A_Double_NotificationPopup_MaxWidthWithSideIcon}"/>
            <Setter Property="Opacity" Value="0"/>
            <Setter Property="local:BindingProxy.A" Value="{StaticResource A_Boolean_False}"/>
            <Setter Property="RenderTransformOrigin" Value="0.5,0.5"/>
            <Setter Property="RenderTransform">
                <Setter.Value>
                    <TranslateTransform />
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <DataTrigger Binding="{Binding Opacity, ElementName=PART_LayoutRoot, Converter={StaticResource A_CompareConverter}, ConverterParameter=0}"
                             Value="{x:Static local:CompareResult.GreaterThan}">
                    <Setter Property="local:BindingProxy.TunnelIn"
                            Value="{Binding ActualHeight, RelativeSource={RelativeSource Self}}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding Show, FallbackValue={StaticResource A_Boolean_False}}" Value="{StaticResource A_Boolean_True}">
                    <Setter Property="local:BindingProxy.A" Value="{StaticResource A_Boolean_True}" />
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_EventFire_Notification" TargetType="{x:Type local:EventFire}">
            <Style.Triggers>
                <DataTrigger Binding="{Binding Show}" Value="True">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_Notification_Show_FzEvents}" />
                    </DataTrigger.EnterActions>
                    <DataTrigger.ExitActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_Notification_Hide_FzEvents}" />
                    </DataTrigger.ExitActions>
                </DataTrigger>
            </Style.Triggers>
        </Style>
        
        <System:Double x:Key="A_Double_NotificationPopup_TitleTextSize_Default">16</System:Double>
        <System:Double x:Key="A_Double_NotificationPopup_TitleTextSize_Large">16</System:Double>

        <MappingConverter x:Key="A_LangStrToNotificationTextLineAdjust" Default="-0.2">
            <MappingConverterEntry Key="DEV" Value="-0.45"/>
            <MappingConverterEntry Key="EN" Value="-0.45"/>
            <MappingConverterEntry Key="GB" Value="-0.45"/>
        </MappingConverter>

        <Style x:Key="A_Style_FZTextBlock_Notification_Base" TargetType="{x:Type local:FZTextBlock}">
            <Setter Property="FontFamily" Value="Horizon_A_tf"/>
            <Setter Property="CapHeight" Value="{StaticResource A_Double_NotificationPopup_TitleTextSize_Default}" />
            <Setter Property="LineAdjust" Value="{Binding LangStr, Source={StaticResource PART_UISceneContext}, Converter={StaticResource A_LangStrToNotificationTextLineAdjust}}"/>
            <Setter Property="Color" Value="{StaticResource A_Color_Notification_BodyText}"/>
            <Setter Property="TextWrapping" Value="Wrap"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="TextAlignment" Value="Center"/>
        </Style>

        <local:MappingConverter x:Key="A_MappingConverter_Color_SeasonToTitleTextColor" Default="{StaticResource H_Color_Primary_Black}">
            <local:MappingConverterEntry Key="{x:Static local:Season.Autumn}" Value="{StaticResource H_Color_Primary_White}" />
        </local:MappingConverter>

        <Style x:Key="A_Style_FZTextBlock_Notification_Title" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Base}">
            <Setter Property="TextWrapping" Value="NoWrap"/>
            <Setter Property="Stretch" Value="None"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsStuntParty}" Value="True">
                    <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsChallenge}" Value="True">
                    <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsSeasonal}" Value="True">
                    <Setter Property="Color" Value="{Binding Season, Converter={StaticResource A_MappingConverter_Color_SeasonToTitleTextColor}}"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Notification_Text" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Base}">
            <Setter Property="Color" Value="{StaticResource A_Color_Notification_ActivationText}"/>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Notification_Gamertag" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Title}">
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Notification_GAMERTAG_INLINE" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Base}">
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Notification_GAMERTAG_SMALL" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Base}">
            <Setter Property="FontFamily" Value="Horizon_B_tf"/>
        </Style>

        <Style x:Key="A_Style_FZRun_AutoDrive_Unsupported_HIGHLIGHT" TargetType="{x:Type local:FZRun}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}"/>
        </Style>

        <MappingConverter x:Key="A_MappingConverter_AutoDrive_Unsupported_Msg">
            <MappingConverterEntry Key="{NoCase HIGHLIGHT}" Value="{StaticResource A_Style_FZRun_AutoDrive_Unsupported_HIGHLIGHT}" />
        </MappingConverter>

        <Style x:Key="A_Style_FZTextBlock_Notification_AutoDrive_Warning" TargetType="{x:Type local:FZTextBlock}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_White}"/>
            <Setter Property="Effect" Value="{StaticResource A_DropShadowEffect_DefaultHud}"/>
            <Setter Property="FontFamily" Value="Horizon_B_tf"/>
            <Setter Property="CapHeight" Value="14"/>
            <Setter Property="MarkupConverter" Value="{StaticResource A_MappingConverter_AutoDrive_Unsupported_Msg}"/>
            <Setter Property="Stretch" Value="None"/>
            <Setter Property="AutoScroll.AllowScrolling" Value="True"/>
            <Setter Property="AutoScroll" Value="{StaticResource H_AutoScrollSettings_Horizontal_Title}"/>
            <Setter Property="HorizontalAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Notification_ActivateDescriptionText" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Text}">
            <Setter Property="local:MultiStringFormatter.Format" Value=""/>
            <Setter Property="local:ScreenReader.LineType" Value="NotificationPrompt"/>
            <Setter Property="local:ScreenReader.Event" Value="OnChange"/>
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding CanBeActivated}" Value="{StaticResource A_Boolean_True}"/>
                        <Condition Binding="{Binding PlayerHasAccepted}" Value="{StaticResource A_Boolean_False}"/>
                        <Condition Binding="{Binding IsInputBlocked}" Value="{StaticResource A_Boolean_False}"/>
                        <Condition Binding="{Binding (local:BindingProxy.A), ElementName=LayoutRoot}" Value="{StaticResource A_Boolean_True}"/>
                        <Condition Binding="{Binding (local:MultiStringFormatter.Output), ElementName=TitleText, Converter={StaticResource A_StringVisConverter}, FallbackValue={x:Static Visibility.Collapsed}}" Value="{x:Static Visibility.Visible}"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="local:MultiStringFormatter.Format" Value="{local:Loc Main.IDS_ScreenReader_Format_NotificationPrompt_WithButton}"/>
                    <Setter Property="local:ScreenReader.Line" Value="{Binding (local:MultiStringFormatter.Output), RelativeSource={RelativeSource Self}}"/>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Notification_InputBlockedText" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Text}">
            <Setter Property="local:ScreenReader.LineType" Value="NotificationPrompt"/>
            <Setter Property="local:ScreenReader.Event" Value="OnChange"/>
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding CanBeActivated}" Value="{StaticResource A_Boolean_True}"/>
                        <Condition Binding="{Binding PlayerHasAccepted}" Value="{StaticResource A_Boolean_False}"/>
                        <Condition Binding="{Binding IsInputBlocked}" Value="{StaticResource A_Boolean_True}"/>
                        <Condition Binding="{Binding (local:BindingProxy.A), ElementName=LayoutRoot}" Value="{StaticResource A_Boolean_True}"/>
                        <Condition Binding="{Binding (local:MultiStringFormatter.Output), ElementName=TitleText, Converter={StaticResource A_StringVisConverter}, FallbackValue={x:Static Visibility.Collapsed}}" Value="{x:Static Visibility.Visible}"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="local:ScreenReader.Line" Value="{Binding InputBlockedText}"/>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Notification_AcceptedText" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Text}">
            <Setter Property="local:ScreenReader.LineType" Value="NotificationPrompt"/>
            <Setter Property="local:ScreenReader.Event" Value="OnChange"/>
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding CanBeActivated}" Value="{StaticResource A_Boolean_True}"/>
                        <Condition Binding="{Binding PlayerHasAccepted}" Value="{StaticResource A_Boolean_True}"/>
                        <Condition Binding="{Binding (local:BindingProxy.A), ElementName=LayoutRoot}" Value="{StaticResource A_Boolean_True}"/>
                        <Condition Binding="{Binding (local:MultiStringFormatter.Output), ElementName=TitleText, Converter={StaticResource A_StringVisConverter}, FallbackValue={x:Static Visibility.Collapsed}}" Value="{x:Static Visibility.Visible}"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="local:ScreenReader.Line" Value="{Binding AcceptedText}"/>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <local:MappingConverter x:Key="A_MappingConverter_FZMaterial_Icon_SeasonEnumToNotificationIcon" Default="{x:Null}" CheckEnumKey="Season">
            <local:MappingConverterEntry Key="{x:Static local:Season.Any}" Value="{x:Null}" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Spring}" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Spring.png" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Summer}" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Summer.png" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Autumn}" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Autumn.png" />
            <local:MappingConverterEntry Key="{x:Static local:Season.Winter}" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Winter.png" />
        </local:MappingConverter>

        <Style x:Key="A_Style_FZMaterial_Notification_HeaderIcon" 
               TargetType="{x:Type local:FZMaterial}">
            <Setter Property="Width" Value="70"/>
            <Setter Property="Height" Value="70"/>
            <Setter Property="Margin" Value="0,-35"/>
            <Setter Property="Visibility" Value="Collapsed"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsNetworkIssue}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Notification_Alert.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsSyncIssue}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Sync.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsSyncing}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Sync.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsConvoy}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Convoy.png" />
                    <Setter Property="Margin" Value="5,-44,0,-26"/>
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsSeasonal}" Value="True">
                    <Setter Property="ImageSource" Value="{Binding Season, Converter={StaticResource A_MappingConverter_FZMaterial_Icon_SeasonEnumToNotificationIcon}}" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding Visibility, ElementName=SideIconContainer}" Value="{Static Visibility.Visible}"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="Visibility" Value="Collapsed"/>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <MappingConverter x:Key="A_Converter_TrueIfNotCollapsed" Default="True">
            <MappingConverterEntry Key="{Static Visibility.Collapsed}" Value="False"/>
        </MappingConverter>
        
        <Style x:Key="A_Style_FZMaterial_Notification_SideIcon" 
               TargetType="{x:Type local:FZMaterial}">
            <Setter Property="Visibility" Value="Collapsed"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsInfectedEvent}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Infected_Invite.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsKingEvent}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/King_Invite.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsRaceEvent}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Race_Invite.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsHorizonChaseHelicopter}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/HorizonChase_Helicopter.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsBucketListEvent}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Bucket_List_Invite.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsDeepLink}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Deep_Link.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsDrivatar}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Drivatar.png" />
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsStuntParty}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Forzathon_Live.png" />
                    <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"/>
                    <Setter Property="Margin" Value="0,0,-4,0"/>
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsEliminator}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Data_Bound/Eliminator/Eliminator.png" />
                    <Setter Property="Preset" Value="{StaticResource A_FZMaterialPreset_FlatPanel_Base}"/>
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding IsHorizonPlay}" Value="True"/>
                        <Condition Binding="{Binding UserProfile}" Value="{x:Null}"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Horizon_Play.png" />
                    <Setter Property="Margin" Value="0,0,-4,0"/>
                    <Setter Property="Visibility" Value="Visible"/>
                </MultiDataTrigger>
                <!-- If we are gonna show a gamerpic, we want to add a side icon as a placeholder -->
                <DataTrigger Binding="{Binding Visibility, Converter={StaticResource A_Converter_TrueIfNotCollapsed}, ElementName=GamerPicMaterial}" Value="True">
                    <Setter Property="Visibility" Value="Visible"/>
                </DataTrigger>
                <DataTrigger Binding="{Binding IsConvoy}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Party_Invite.png" />
                </DataTrigger>
                <DataTrigger Binding="{Binding IsChallenge}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Party_Invite.png" />
                </DataTrigger>
                <DataTrigger Binding="{Binding IsEventInvitation}" Value="True">
                    <Setter Property="ImageSource" Value="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Party_Invite.png" />
                </DataTrigger>
            </Style.Triggers>
        </Style>


        <Style x:Key="A_Style_FZMaterial_Notification_Border" TargetType="{x:Type local:FZMaterial}">
            <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsConvoy}" Value="True">
                    <Setter Property="Color" Value="{StaticResource H_Color_Primary_Green}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding IsStuntParty}" Value="True"> 
                    <Setter Property="Color" Value="{StaticResource A_Color_ForzathonLive_Highlight}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding IsSeasonal}" Value="True">
                    <Setter Property="Color" Value="{Binding Season, Converter={StaticResource A_Converter_Season_To_Color}}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding IsEventInvitation}" Value="True">
                    <Setter Property="Color" Value="{StaticResource H_Color_Primary_LightBlue}" />
                </DataTrigger>
                <DataTrigger Binding="{Binding IsChallenge}" Value="True">
                    <Setter Property="Color" Value="#FFAC33F2" />
                </DataTrigger>
                <DataTrigger Binding="{Binding IsHorizonChaseHelicopter}" Value="True">
                    <Setter Property="Color" Value="#FF36BBCC" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
        
        <Style x:Key="A_Style_FZMaterial_Notification_GamerPic" TargetType="{x:Type local:FZMaterial}">
            <Setter Property="Visibility" Value="Collapsed"/>
            <Style.Triggers>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding UserProfile, Converter={StaticResource H_TrueIfNotNull}}" Value="True"/>
                        <Condition Binding="{Binding ShowGamerpic}" Value="True"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="ImageSource" Value="{Binding UserProfile, Converter={StaticResource A_GamerPicConverter}, ConverterParameter={StaticResource A_Size_Notification_GamerPicSizeParams}}" />
                    <Setter Property="Visibility" Value="{Binding Downloaded, RelativeSource={RelativeSource Self}, Converter={StaticResource A_FZBooleanToVisibilityConverter_UseHidden}}" />
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <local:StringSubstitutionConverter x:Key="A_Converter_NotificationMarkupSubstitution">
            <local:StringSubstitution Find="[TM]" Replace="{local:Loc InGame.IDS_Trademark}"/>
            <local:StringSubstitution Find="[GAMERTAG]" Replace="{StaticResource A_String_0FormatString}"/>
            <local:StringSubstitution Find="[GAMERTAG_SMALL]" Replace="{StaticResource A_String_0FormatString}"/>
            <local:StringSubstitution Find="[GAMERTAG_INLINE]" Replace="{StaticResource A_String_0FormatString}"/>
        </local:StringSubstitutionConverter>

        <Style x:Key="A_Style_NotificationMarkup_TEXT"
               TargetType="local:FZRun">
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_LARGE"
               TargetType="local:FZRun">
            <Setter Property="CapHeight" Value="{StaticResource A_Double_NotificationPopup_TitleTextSize_Large}"/>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_HIGHLIGHT_LARGE"
               TargetType="local:FZRun">
            <Setter Property="Color" Value="{StaticResource A_Color_Notification_HighlightText}"/>
            <Setter Property="CapHeight" Value="{StaticResource A_Double_NotificationPopup_TitleTextSize_Large}"/>
            <Setter Property="FontFamily" Value="Horizon_A_tf"/>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_HIGHLIGHT"
               TargetType="local:FZRun">
            <Setter Property="Color" Value="{StaticResource A_Color_Notification_HighlightText}"/>
            <Setter Property="CapHeight" Value="{StaticResource A_Double_NotificationPopup_TitleTextSize_Large}"/>
            <Setter Property="FontFamily" Value="Horizon_A_tf"/>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_HIGHLIGHT_SMALL"
               TargetType="local:FZRun">
            <Setter Property="Color" Value="{StaticResource A_Color_Notification_HighlightText}"/>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_BOLD"
               TargetType="local:FZRun">
            <Setter Property="FontFamily" Value="Horizon_A_tf"/>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_TM" TargetType="{x:Type Control}">
            <Setter Property="HorizontalAlignment" Value="Stretch"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <local:FZTextBlock Text="{local:Loc InGame.IDS_Trademark}"
                                           TextAlignment="Center"
                                           FontFamily="Horizon_A_tf"
                                           CapHeight="10"
                                           Margin="0,0,0,12"
                                           HorizontalAlignment="Stretch"
                                           Style="{StaticResource A_Style_FZTextBlock_Notification_Base}"
                                           TextWrapping="NoWrap"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_ALERT" TargetType="{x:Type Control}">
            <Setter Property="HorizontalAlignment" Value="Stretch"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Notification_Alert.png"
                                    Width="36"
                                    Height="36" 
                                    Margin="0,-18"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_FORZATHON_HIGHLIGHT"
               TargetType="local:FZRun">
            <Setter Property="Color" Value="{StaticResource A_Color_ForzathonLive_Highlight}"/>
            <Setter Property="CapHeight" Value="{StaticResource A_Double_NotificationPopup_TitleTextSize_Large}"/>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_FORZATHON_HIGHLIGHT_SMALL"
               TargetType="local:FZRun">
            <Setter Property="Color" Value="{StaticResource A_Color_ForzathonLive_Highlight}"/>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_GAMERTAG" TargetType="{x:Type Control}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <local:FZTextBlock x:Name="GamertagText"
                                           Margin="0,0,0,12"
                                           Text="{Binding UserProfile.FormattedGamertag}"
                                           Style="{StaticResource A_Style_FZTextBlock_Notification_Gamertag}"
                                           CapHeight="{StaticResource A_Double_NotificationPopup_TitleTextSize_Large}"
                                           TextWrapping="NoWrap"
                                           local:AncestorPropertySetter.Type="{x:Type local:FZTextBlock}"
                                           local:AncestorPropertySetter.AttachedPropertyType="{x:Type local:MultiStringFormatter}"
                                           local:AncestorPropertySetter.Property="Param0"
                                           local:AncestorPropertySetter.Value="{Binding UserProfile.FormattedGamertag}"
                                           local:AncestorPropertySetter.AllowParentBindingFailure="{StaticResource A_Boolean_True}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_GAMERTAG_SMALL" TargetType="{x:Type Control}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <local:FZTextBlock x:Name="GamertagText"
                                           Text="{Binding UserProfile.FormattedGamertag}"
                                           Style="{StaticResource A_Style_FZTextBlock_Notification_GAMERTAG_SMALL}"
                                           TextWrapping="NoWrap"
                                           local:AncestorPropertySetter.Type="{x:Type local:FZTextBlock}"
                                           local:AncestorPropertySetter.AttachedPropertyType="{x:Type local:MultiStringFormatter}"
                                           local:AncestorPropertySetter.Property="Param0"
                                           local:AncestorPropertySetter.Value="{Binding UserProfile.FormattedGamertag}"
                                           local:AncestorPropertySetter.AllowParentBindingFailure="{StaticResource A_Boolean_True}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_GAMERTAG_INLINE" TargetType="{x:Type Control}">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <local:FZTextBlock x:Name="GamertagText"
                                           Text="{Binding UserProfile.FormattedGamertag}"
                                           Style="{StaticResource A_Style_FZTextBlock_Notification_GAMERTAG_INLINE}"
                                           TextWrapping="NoWrap"
                                           local:AncestorPropertySetter.Type="{x:Type local:FZTextBlock}"
                                           local:AncestorPropertySetter.AttachedPropertyType="{x:Type local:MultiStringFormatter}"
                                           local:AncestorPropertySetter.Property="Param0"
                                           local:AncestorPropertySetter.Value="{Binding UserProfile.FormattedGamertag}"
                                           local:AncestorPropertySetter.AllowParentBindingFailure="{StaticResource A_Boolean_True}"/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="A_Style_NotificationMarkup_CARCLASS" TargetType="{x:Type Control}" BasedOn="{StaticResource A_Style_Control_CarClassBadge_Small_Default}">
            <Setter Property="local:BindingProxy.A" Value="{Binding XAMLCarRestrictions.CarPIMaxRestriction}" />
            <Setter Property="local:BindingProxy.B" Value="{Binding XAMLCarRestrictions.CarClassRestriction}" />
            <Setter Property="local:BindingProxy.C" Value="{Binding XAMLCarRestrictions.CarPIMinRestriction}" />
            <Setter Property="Height" Value="28"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Margin" Value="0,-14"/>
            <Style.Triggers>
            <!-- when displaying a PI range, B is set to H_InvalidCarClassRestriction - this is the same condition that is used in H_CarClassBadge_Default which changes the Format of the text to be '{0} - {1}' when a range is displayed -->
                <DataTrigger Binding="{Binding (local:BindingProxy.B), RelativeSource={RelativeSource Self}}" Value="{StaticResource H_InvalidCarClassRestriction}">
                    <Setter Property="BindingProxy.AlwaysValidNumeric" Value="{StaticResource A_Double_NotificationPopup_WidthForPIRange}"/>
                    <Setter Property="Width" Value="auto"/>
                </DataTrigger>
            </Style.Triggers>
        </Style>

        <MappingConverter x:Key="A_MappingConverter_Notification">
            <MappingConverterEntry Key="{NoCase TEXT}" Value="{StaticResource A_Style_NotificationMarkup_TEXT}" />
            <MappingConverterEntry Key="{NoCase LARGE}" Value="{StaticResource A_Style_NotificationMarkup_LARGE}" />
            <MappingConverterEntry Key="{NoCase HIGHLIGHT_LARGE}" Value="{StaticResource A_Style_NotificationMarkup_HIGHLIGHT_LARGE}" />
            <MappingConverterEntry Key="{NoCase HIGHLIGHT}" Value="{StaticResource A_Style_NotificationMarkup_HIGHLIGHT}" />
            <MappingConverterEntry Key="{NoCase HIGHLIGHT_SMALL}" Value="{StaticResource A_Style_NotificationMarkup_HIGHLIGHT_SMALL}" />
            <MappingConverterEntry Key="{NoCase TM}" Value="{StaticResource A_Style_NotificationMarkup_TM}" />
            <MappingConverterEntry Key="{NoCase FORZATHON_HIGHLIGHT}" Value="{StaticResource A_Style_NotificationMarkup_FORZATHON_HIGHLIGHT}" />
            <MappingConverterEntry Key="{NoCase FORZATHON_HIGHLIGHT_SMALL}" Value="{StaticResource A_Style_NotificationMarkup_FORZATHON_HIGHLIGHT_SMALL}" />
            <MappingConverterEntry Key="{NoCase GAMERTAG}" Value="{StaticResource A_Style_NotificationMarkup_GAMERTAG}" />
            <MappingConverterEntry Key="{NoCase GAMERTAG_SMALL}" Value="{StaticResource A_Style_NotificationMarkup_GAMERTAG_SMALL}" />
            <MappingConverterEntry Key="{NoCase GAMERTAG_INLINE}" Value="{StaticResource A_Style_NotificationMarkup_GAMERTAG_INLINE}" />
            <MappingConverterEntry Key="{NoCase CARCLASS}" Value="{StaticResource A_Style_NotificationMarkup_CARCLASS}" />
            <MappingConverterEntry Key="{NoCase ALERT}" Value="{StaticResource A_Style_NotificationMarkup_ALERT}" />
            <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_NotificationMarkup_BOLD}" />
        </MappingConverter>

        <Style x:Key="A_Style_FZTextBlock_Notification_TitleText" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Title}">
            <Setter Property="AutoScroll.AllowScrolling" Value="True"/>
            <Setter Property="AutoScroll" Value="{StaticResource H_AutoScrollSettings_Horizontal_Title}"/>
            <Setter Property="local:MultiStringFormatter.Format" Value=""/>
            <Setter Property="local:ScreenReader.LineType" Value="NotificationTitle"/>
            <Setter Property="local:ScreenReader.Event" Value="OnChange"/>
            <Style.Triggers>
                <DataTrigger Binding="{Binding (local:BindingProxy.A), ElementName=LayoutRoot}" Value="{StaticResource A_Boolean_True}">
                    <Setter Property="local:MultiStringFormatter.Format" Value="{Binding Title, Converter={StaticResource A_Converter_NotificationMarkupSubstitution}}"/>
                    <Setter Property="local:ScreenReader.Line" Value="{Binding (local:MultiStringFormatter.Output), Converter={StaticResource A_Converter_TrimInlineMarkup}, RelativeSource={RelativeSource Self}}"/>
                </DataTrigger>
                <MultiDataTrigger>
                    <MultiDataTrigger.Conditions>
                        <Condition Binding="{Binding TitleScreenReader, Converter={StaticResource A_StringVisConverter}, FallbackValue={x:Static Visibility.Collapsed}}" Value="{x:Static Visibility.Visible}"/>
                        <Condition Binding="{Binding (local:BindingProxy.A), ElementName=LayoutRoot}" Value="{StaticResource A_Boolean_True}"/>
                    </MultiDataTrigger.Conditions>
                    <Setter Property="local:MultiStringFormatter.Format" Value="{Binding TitleScreenReader, Converter={StaticResource A_Converter_NotificationMarkupSubstitution}}"/>
                    <Setter Property="local:ScreenReader.Line" Value="{Binding (local:MultiStringFormatter.Output), Converter={StaticResource A_Converter_TrimInlineMarkup}, RelativeSource={RelativeSource Self}}"/>
                </MultiDataTrigger>
            </Style.Triggers>
        </Style>

        <Style x:Key="A_Style_FZTextBlock_Notification_TopText" TargetType="{x:Type local:FZTextBlock}" BasedOn="{StaticResource A_Style_FZTextBlock_Notification_Base}">
            <Setter Property="FontFamily" Value="Horizon_B_tf"/>
        </Style>

        <KeyTime x:Key="A_KeyTime_NotificationShowAnimation">0:0:0.45</KeyTime>
        <KeyTime x:Key="A_KeyTime_NotificationHideAnimation">0:0:0.20</KeyTime>

        <ExponentialEase x:Key="A_EasingFunction_EaseIn" EasingMode="EaseIn"/>
        <ExponentialEase x:Key="A_EasingFunction_EaseOut" EasingMode="EaseOut"/>

        <ControlTemplate x:Key="A_ControlTemplate_NotifcationPopupControl" TargetType="ContentControl">
            <ControlTemplate.Resources>
                <Storyboard x:Key="A_Storyboard_Notification_Show">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Opacity)"
                                                    Storyboard.TargetName="PART_LayoutRoot">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="0.0" />
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.25" Value="1.0" />
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.Transform).(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
                        Storyboard.TargetName="PART_LayoutRoot">
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.0" Value="80"/>
                        <DiscreteDoubleKeyFrame KeyTime="0:0:0.25" Value="80"/>
                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_NotificationShowAnimation}" Value="0" EasingFunction="{StaticResource A_EasingFunction_EaseIn}"/>
                    </DoubleAnimationUsingKeyFrames>
                    <StringAnimationUsingKeyFrames Storyboard.TargetProperty="(local:AudioEvent.SoundName)"
                                                    Storyboard.TargetName="ShowAudioEvent">
                        <DiscreteStringKeyFrame KeyTime="0:0:0"
                                                Value="/Master/UI/Notification/HZ3_SFX_HUD_Notification_MinorOn_01" />
                        <DiscreteStringKeyFrame KeyTime="0:0:0.333"
                                                Value="" />
                    </StringAnimationUsingKeyFrames>
                </Storyboard>

                <Storyboard x:Key="A_Storyboard_Notification_Hide">
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Opacity)"
                                                    Storyboard.TargetName="PART_LayoutRoot">
                        <DiscreteDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_NotificationHideAnimation}" Value="0.0" />
                    </DoubleAnimationUsingKeyFrames>
                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(local:ZPanel.Transform).(RotateTransform3D.Rotation).(AxisAngleRotation3D.Angle)"
                        Storyboard.TargetName="PART_LayoutRoot">
                        <DiscreteDoubleKeyFrame KeyTime="0" Value="0"/>
                        <EasingDoubleKeyFrame KeyTime="{StaticResource A_KeyTime_NotificationHideAnimation}" Value="-99" EasingFunction="{StaticResource A_EasingFunction_EaseIn}"/>
                    </DoubleAnimationUsingKeyFrames>
                </Storyboard>

                <Style x:Key="A_Style_Decorator_Countdown_Visibility" TargetType="Decorator">
                    <Setter Property="Visibility" Value="{Binding ShowCountdown, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Countdown, Converter={StaticResource A_CompareConverter}, ConverterParameter=60}" Value="1">
                            <Setter Property="Visibility" Value="Collapsed"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>

            </ControlTemplate.Resources>

            <ControlTemplate.Triggers>
                <DataTrigger Binding="{Binding Show}" Value="True">
                    <DataTrigger.EnterActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_Notification_Show}" />
                    </DataTrigger.EnterActions>
                    <DataTrigger.ExitActions>
                        <BeginStoryboard Storyboard="{StaticResource A_Storyboard_Notification_Hide}" />
                    </DataTrigger.ExitActions>
                </DataTrigger>
            </ControlTemplate.Triggers>

            <Grid x:Name="PART_LayoutRoot" Style="{StaticResource A_Style_FrameworkElement_Notification}">
                <local:ZPanel.Transform>
                    <RotateTransform3D CenterY="{Binding ActualHeight, ElementName=LayoutRoot, Converter={LinearTransformConverter Scale=0.5}}">
                        <RotateTransform3D.Rotation>
                            <AxisAngleRotation3D Axis="-1,0,0" Angle="0"/>
                        </RotateTransform3D.Rotation>
                    </RotateTransform3D>
                </local:ZPanel.Transform>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/> <!-- GamerPic Width -->
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="35"/>
                </Grid.RowDefinitions>
                <local:FZMaterial Grid.Column="1"
                                  Grid.Row="1"
                                  Color="{StaticResource H_Color_Primary_White}"/>
                <Grid Grid.Column="1"
                      Grid.Row="1"
                      MinWidth="{StaticResource A_Double_NotificationPopup_MinWidth}"
                      MaxWidth="{StaticResource A_Double_NotificationPopup_MaxWidth}"
                      MinHeight="{StaticResource A_Double_NotificationPopup_ContentMinHeight}">
                    <StackPanel Orientation="Vertical"
                                VerticalAlignment="Center"
                                HorizontalAlignment="Center"
                                Margin="14,14">
                        <local:FZTextBlock x:Name="TopText"
                                           Text="{Binding TopText}"
                                           Margin="0,0,0,0"
                                           MarkupConverter="{StaticResource A_MappingConverter_Notification}"
                                           Style="{StaticResource A_Style_FZTextBlock_Notification_TopText}"
                                           Visibility="{Binding TopText, Converter={StaticResource A_StringVisConverter}}"/>
                        
                        <FrameworkElement Height="14">
                            <FrameworkElement.Style>
                                <Style>
                                    <Setter Property="Visibility" Value="Collapsed"/>
                                    <Style.Triggers>
                                        <MultiDataTrigger>
                                            <MultiDataTrigger.Conditions>
                                                <Condition Binding="{Binding Visibility, ElementName=TopText}" Value="{Static Visibility.Visible}"/>
                                                <Condition Binding="{Binding ActualHeight, Converter={StaticResource H_VisibleIfGreaterThanZero}, ElementName=BottomContainer}" Value="{Static Visibility.Visible}"/>
                                            </MultiDataTrigger.Conditions>
                                            <Setter Property="Visibility" Value="Visible"/>
                                        </MultiDataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </FrameworkElement.Style>
                        </FrameworkElement>

                        <StackPanel x:Name="BottomContainer" 
                                    Orientation="Horizontal"
                                    HorizontalAlignment="Center">
                            <FZTextBlock x:Name="BottomText"
                                         Style="{StaticResource A_Style_FZTextBlock_Notification_Base}"
                                         MarkupConverter="{StaticResource A_MappingConverter_Notification}"
                                         Text="{Binding BottomText}"
                                         Visibility="{Binding BottomText, Converter={StaticResource A_StringVisConverter}}"/>

                            <!-- Separator -->
                            <FZMaterial Height="30" Width="2" Color="#B0B0B0" Margin="10, -15">
                                <FZMaterial.Style>
                                    <Style>
                                        <Setter Property="Visibility" Value="Collapsed"/>
                                        <Style.Triggers>
                                            <MultiDataTrigger>
                                                <MultiDataTrigger.Conditions>
                                                    <Condition Binding="{Binding Visibility, ElementName=BottomText}" Value="{Static Visibility.Visible}"/>
                                                    <Condition Binding="{Binding Visibility, ElementName=PromptContainer}" Value="{Static Visibility.Visible}"/>
                                                </MultiDataTrigger.Conditions>
                                                <Setter Property="Visibility" Value="Visible"/>
                                            </MultiDataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </FZMaterial.Style>
                            </FZMaterial>

                            <Grid Visibility="{Binding CanBeActivated, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"  x:Name="PromptContainer">
                                <Grid Visibility="{Binding PlayerHasAccepted, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                    <StackPanel Orientation="Horizontal" 
                                                Visibility="{Binding IsInputBlocked, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}}">
                                        <Viewbox MinHeight="25"
                                                 MinWidth="25"
                                                 Margin="0,-10,7,-12">
                                            <local:ControllerButtonControl x:Name="ActivateButton"
                                                            Margin="0"
                                                            Style="{StaticResource A_Style_ControllerButtonControl_ActivationButton}"
                                                            Command="{Binding ActivateCommand}"
                                                            InputOverride="{Binding InputDisplayOverride}"/>
                                        </Viewbox>
                                        <local:FZTextBlock x:Name="ButtonText"
                                                           Text="{Binding ActivateDescription}"
                                                           Style="{StaticResource A_Style_FZTextBlock_Notification_ActivateDescriptionText}"
                                                           local:MultiStringFormatter.Param0="{Binding ScreenReaderName, ElementName=ActivateButton}"
                                                           local:MultiStringFormatter.Param1="{Binding ActivateDescription}"/>
                                    </StackPanel>
                                    <local:FZTextBlock x:Name="InputBlockedText"
                                                       Style="{StaticResource A_Style_FZTextBlock_Notification_InputBlockedText}"
                                                       Visibility="{Binding IsInputBlocked, Converter={StaticResource A_FZBooleanToVisibilityConverter}}"
                                                       VerticalAlignment="Center"
                                                       Text="{Binding InputBlockedText}"
                                                       MarkupConverter="{StaticResource A_MappingConverter_Notification}"/>
                                </Grid>
                                <StackPanel Orientation="Horizontal"
                                            Visibility="{Binding PlayerHasAccepted, Converter={StaticResource A_FZBooleanToVisibilityConverter}}">
                                    <local:FZTextBlock x:Name="AcceptedText"
                                                       Text="{Binding AcceptedText}"
                                                       Style="{StaticResource A_Style_FZTextBlock_Notification_AcceptedText}"
                                                       VerticalAlignment="Center"/>
                                </StackPanel>

                            </Grid>
                        </StackPanel>
                    </StackPanel>
                </Grid>

                <FZMaterial x:Name="AutoDriveWarningContainer"
                            Style="{StaticResource A_Style_FZMaterial_Popup_Background}"
                            Grid.Row="2"
                            Grid.ColumnSpan="2"
                            Margin="50,0"
                            Visibility="{Binding UnsupportedAutoDriveMessage, Converter={StaticResource A_StringVisConverter}}">
                    <StackPanel HorizontalAlignment="Center"
                                Orientation="Horizontal"
                                Margin="10,0"
                                ClipToBounds="True"
                                MaxWidth="{StaticResource A_Double_NotificationPopup_Unsupported_AutoDrive_Msg_MaxWidth}">
                        <FZMaterial Width="15"
                                    Height="15"
                                    Color="{StaticResource H_Color_Primary_Yellow}"
                                    ImageSource="/ForzaUI;component/Textures/Anthem/Icons/NotificationPopup/Warning_Icon.png"/>
                        <Decorator Width="5"/>
                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_Notification_AutoDrive_Warning}"
                                     MaxWidth="{StaticResource A_Double_NotificationPopup_Unsupported_AutoDrive_Msg_MaxWidth}"
                                     Text="{Binding UnsupportedAutoDriveMessage}"/>
                    </StackPanel>
                </FZMaterial>

                <local:EventFire x:Name="EventFire" Style="{StaticResource A_Style_EventFire_Notification}" />
                <local:AudioEvent x:Name="ShowAudioEvent" />

                <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Notification_Border}"
                                  HorizontalAlignment="Stretch"
                                  Height="{StaticResource A_Double_MinorNotification_HeaderHeight}"
                                  Grid.Column="1"
                                  Grid.Row="0"/>
                <Grid Grid.Row="0" Grid.Column="1" Height="{StaticResource A_Double_MinorNotification_HeaderHeight}">
                    <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Notification_HeaderIcon}"
                                      HorizontalAlignment="Left"/>
                    <local:FZTextBlock x:Name="TitleText"
                                       Text="{Binding Title}"
                                       Margin="70,0"
                                       MarkupConverter="{StaticResource A_MappingConverter_Notification}"
                                       Style="{StaticResource A_Style_FZTextBlock_Notification_TitleText}"/>
                    <Decorator Style="{StaticResource A_Style_Decorator_Countdown_Visibility}"
                               VerticalAlignment="Top"
                               HorizontalAlignment="Right"
                               Margin="0,-8,5,0">
                        <ContentControl Content="{Binding Countdown, Converter={StaticResource A_NumUnitConverter_NoUnit_0dp}}"
                                        Style="{StaticResource H_Style_NotificationBadge_Square}"
                                        Margin="0,0,3,3"/>
                    </Decorator>
                    <ProgressBar Style="{StaticResource A_Style_ProgressBar_NotificationSpinner}" 
                                 HorizontalAlignment="Right"
                                 Visibility="{Binding ShowSpinner, Converter={StaticResource A_FZBooleanToVisibilityConverter}, FallbackValue={x:Static Visibility.Hidden}}"/>
                </Grid>
                
                <Grid x:Name="SideIconContainer"
                      Grid.Column="0"
                      Grid.RowSpan="2"
                      Width="{Binding ActualHeight, RelativeSource={RelativeSource Self}}">
                    <Grid.Style>
                        <Style>
                            <Setter Property="Visibility" Value="Visible"/>
                            <Style.Triggers>
                                <MultiDataTrigger>
                                    <MultiDataTrigger.Conditions>
                                        <Condition Binding="{Binding Visibility, ElementName=GamerPicMaterial}" Value="{Static Visibility.Collapsed}"/>
                                        <Condition Binding="{Binding Visibility, ElementName=SideIconMaterial}" Value="{Static Visibility.Collapsed}"/>
                                    </MultiDataTrigger.Conditions>
                                    <Setter Property="Visibility" Value="Collapsed"/>
                                </MultiDataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Grid.Style>
                    <local:FZMaterial x:Name="SideIconMaterial"
                                      Style="{StaticResource A_Style_FZMaterial_Notification_SideIcon}"/>
                    <local:FZMaterial x:Name="GamerPicMaterial"
                                      Style="{StaticResource A_Style_FZMaterial_Notification_GamerPic}"/>
                </Grid>
            </Grid>
        </ControlTemplate>
    </UserControl.Resources>

    <ContentControl Template="{StaticResource A_ControlTemplate_NotifcationPopupControl}" />
</UserControl>
