<Page xmlns:local="clr-namespace:ForzaUI"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      x:Class="ForzaUI.A_PauseOptions"
      mc:Ignorable="d"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <Page.Resources>
        <ResourceDictionary>

            <local:MappingConverter x:Key="A_Converter_HeadToHeadChallengeMeToggleStrings"
                Default="{local:Loc PauseMenu.IDS_TileText_HeadToHeadChallengeMeToggle_Off}">
                <local:MappingConverterEntry Key="True" Value="{local:Loc PauseMenu.IDS_TileText_HeadToHeadChallengeMeToggle_On}"/>
                <local:MappingConverterEntry Key="False" Value="{local:Loc PauseMenu.IDS_TileText_HeadToHeadChallengeMeToggle_Off}"/>
            </local:MappingConverter>
            
            <local:TileMenuDataItem x:Key="A_MenuDataItem_Assists"
                                    Heading="{local:Loc TiledMenus.IDS_Options_TileTitle_Difficulty}"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_Difficulty}"
                                    Icon="/ForzaUI;component/Textures/Anthem/TileBackgrounds/Difficulty.png"
                                    FloatingIcon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/FloatingIcons/Cog.png" />

            <local:TileMenuDataItem x:Key="A_MenuDataItem_Controls"
                                    Heading="{local:Loc TiledMenus.IDS_Options_TileTitle_Controls}"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_Controls}"
                                    Icon="/ForzaUI;component/Textures/Anthem/TileBackgrounds/Controls.png"
                                    FloatingIcon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/FloatingIcons/Controller.png" />

            <local:TileMenuDataItem x:Key="A_MenuDataItem_Hud"
                                    Heading="{local:Loc TiledMenus.IDS_Options_TileTitle_Hud}"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_Hud}"
                                    Icon="/ForzaUI;component/Textures/Anthem/TileBackgrounds/Hud.png"
                                    FloatingIcon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/FloatingIcons/Hud.png" />

            <local:TileMenuDataItem x:Key="A_MenuDataItem_NameSelect"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileTitle_NameSelect}"
                                    Icon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/NameSelect.png" />

            <local:TileMenuDataItem x:Key="A_MenuDataItem_Audio"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_Audio}"
                                    Icon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/Audio.png" />

            <local:TileMenuDataItem x:Key="A_MenuDataItem_Video"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_Video}"
                                    Icon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/Video.png" />

            <local:TileMenuDataItem x:Key="A_MenuDataItem_TeamCredits"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_TeamCredits}"
                                    Icon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/TeamCredits.png" />

            <local:CharacterSelectTileMenuDataItem x:Key="A_MenuDataItem_CharacterSelect"
                                    Heading="{local:Loc TiledMenus.IDS_Options_TileTitle_CharacterSelect}"
                                    FloatingIcon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/FloatingIcons/Character_Select.png"/>

            <local:TileMenuDataItem x:Key="A_MenuDataItem_Accessibility"
                                    Heading="{local:Loc TiledMenus.IDS_Options_TileTitle_Accessibility}"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_Accessibility}"
                                    Icon="/ForzaUI;component/Textures/Anthem/TileBackgrounds/Accessibility.png"
                                    FloatingIcon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/FloatingIcons/Cog.png"/>

            <local:TileMenuDataItem x:Key="A_MenuDataItem_QuickChatSelect"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_QuickChatSelect}"
                                    Icon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/QuickChatSelect.png"/>

            <local:TileMenuDataItem x:Key="A_MenuDataItem_LanguageSelect"
                                    Description="{local:Loc TiledMenus.IDS_Options_TileText_LanguageSelect}"
                                    Icon="/ForzaUI;component/Textures/Anthem/Icons/TiledMenus/LanguageSelect.png"/>
        </ResourceDictionary>
    </Page.Resources>

    <local:UIPageTransitionManager.TransitionManager>
        <local:UIPageTransitionManager Preset="{StaticResource A_UIPageTransitionManagerPreset_TiledSubMenu}"/>
    </local:UIPageTransitionManager.TransitionManager>

    <Grid>
        <!-- Background Blur -->
       <Control Style="{StaticResource A_Style_Control_ScreenBackground}" />

        <!-- Bars -->
        <local:PlayerBarControl x:Name="TopBar" Style="{StaticResource A_Style_PlayerBarControl}" />
        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                x:Name="BottomBar">
            <local:ControllerButtonPanel x:Name="HelpPanel"
                                         Style="{StaticResource A_Style_ControllerButtonPanel_Default}">
                <local:ControllerButtonControl Button="A"
                                               Description="{local:Loc HelpButtons.IDS_Select}" />
                <local:ControllerButtonControl Button="B"
                                               Description="{local:Loc HelpButtons.IDS_Back}" />
                <local:ControllerButtonControl Button="Y"
                                               Description="{local:Loc HelpButtons.IDS_ChangeUser}"
                                               Visibility="{Binding IsPC, Converter={StaticResource A_FZBooleanToVisibilityConverter_Inverse}, RelativeSource={RelativeSource AncestorType=Page}}" />
            </local:ControllerButtonPanel>
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding_TiledScene}">
            <Grid x:Name="LayoutRoot"
                KeyboardNavigation.DirectionalNavigation="Contained"
                Style="{StaticResource A_Style_FrameworkElement_ScreenTilt}">
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"/>
                    <RowDefinition Height="{StaticResource A_GridLength_TileMenu_Height}"/>
                </Grid.RowDefinitions>

                <Decorator Style="{StaticResource A_Style_FrameworkElement_TiledMenuTransition_1}"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Bottom"
                           Margin="312,0,0,0"
                           Grid.Row="0">
                    <ContentControl Content="{local:Loc ScreenTitles.IDS_MyProfile}" Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                                    local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Options.png"/>
                </Decorator>

                <StackPanel x:Name="PART_MenuContent"
                    RenderTransformOrigin="0.5,0.5"
                    Grid.Row="1">
                    <local:AutoSizeCanvas x:Name="PART_SCOPE_Home">
                        <local:FZButton x:Name="PART_Button_Assists"
                                DataContext="{StaticResource A_MenuDataItem_Assists}"
                                Style="{StaticResource A_Style_Button_MainImageTile}"
                                local:TileMenuNavigationManager.GridX="22"
                                local:TileMenuNavigationManager.GridY="0"/>
                        <local:FZButton x:Name="PART_Button_Controls"
                                DataContext="{StaticResource A_MenuDataItem_Controls}"
                                Style="{StaticResource A_Style_Button_ImageTile}"
                                local:TileMenuNavigationManager.GridX="52"
                                local:TileMenuNavigationManager.GridY="0"
                                local:TileMenuNavigationManager.GridWidth="13"
                                local:TileMenuNavigationManager.GridHeight="16"/>
                        <local:FZButton x:Name="PART_Button_Hud"
                                DataContext="{StaticResource A_MenuDataItem_Hud}"
                                Style="{StaticResource A_Style_Button_ImageTile}"
                                local:TileMenuNavigationManager.GridX="22"
                                local:TileMenuNavigationManager.GridY="16"
                                local:TileMenuNavigationManager.GridWidth="21"
                                local:TileMenuNavigationManager.GridHeight="14"/>
                        
                        <local:FZButton x:Name="PART_Button_NameSelect"
                                DataContext="{StaticResource A_MenuDataItem_NameSelect}"
                                Style="{StaticResource A_Style_Button_IconTile}"
                                local:TileMenuNavigationManager.GridX="13"
                                local:TileMenuNavigationManager.GridY="16"/>
                        <local:FZButton x:Name="PART_Button_Audio"
                                DataContext="{StaticResource A_MenuDataItem_Audio}"
                                Style="{StaticResource A_Style_Button_IconTile}"
                                local:TileMenuNavigationManager.GridX="13"
                                local:TileMenuNavigationManager.GridY="20"/>
                        <local:FZButton x:Name="PART_Button_Video"
                                DataContext="{StaticResource A_MenuDataItem_Video}"
                                Style="{StaticResource A_Style_Button_IconTile}"
                                local:TileMenuNavigationManager.GridX="13"
                                local:TileMenuNavigationManager.GridY="24"/>
                        
                        <local:FZButton x:Name="PART_Button_QuickChatSelect"
                                DataContext="{StaticResource A_MenuDataItem_QuickChatSelect}"
                                Style="{StaticResource A_Style_Button_IconTile}"
                                local:TileMenuNavigationManager.GridX="52"
                                local:TileMenuNavigationManager.GridY="20"
                                local:TileMenuNavigationManager.TileState="{x:Static local:TileState.Disabled}"/>

                        <local:TileMenuDataItem x:Name="A_MenuDataItem_HeadToHeadChallengeMeToggle"
                                    Description="{Binding CanLocalPlayerAcceptHeadToHeadChallenges, RelativeSource={RelativeSource AncestorType=Page}, Converter={StaticResource A_Converter_HeadToHeadChallengeMeToggleStrings}}"
                                    Icon="/ForzaUI;component/Textures/Anthem/Icons/PauseMenu/Challenge_Me.png"
                                    UseAlternateColors="{Binding CanLocalPlayerAcceptHeadToHeadChallenges, RelativeSource={RelativeSource AncestorType=Page}}" />

                        <local:FZButton x:Name="PART_Button_HeadToHeadChallengeMeToggle"
                            Style="{StaticResource A_Style_Button_ToggleIconTile}"
                            local:TileMenuNavigationManager.GridX="52"
                            local:TileMenuNavigationManager.GridY="16"
                            Command="{Binding HeadToHeadChallengeMeToggleCommand, RelativeSource={RelativeSource AncestorType=Page}}"
                            DataContext="{Binding ElementName=A_MenuDataItem_HeadToHeadChallengeMeToggle}"/>

                        <local:FZButton x:Name="PART_Button_TeamCredits"
                                DataContext="{StaticResource A_MenuDataItem_TeamCredits}"
                                Style="{StaticResource A_Style_Button_IconTile}"
                                local:TileMenuNavigationManager.GridX="52"
                                local:TileMenuNavigationManager.GridY="20"/>
                        <local:FZButton x:Name="PART_Button_LanguageSelect"
                                DataContext="{StaticResource A_MenuDataItem_LanguageSelect}"
                                Style="{StaticResource A_Style_Button_IconTile}"
                                local:TileMenuNavigationManager.GridX="52"
                                local:TileMenuNavigationManager.GridY="24" />

                        <local:FZButton x:Name="PART_Button_CharacterSelect"
                                DataContext="{StaticResource A_MenuDataItem_CharacterSelect}"
                                Style="{StaticResource A_Style_Button_CharacterSelectTile}"
                                local:TileMenuNavigationManager.GridX="9"
                                local:TileMenuNavigationManager.GridY="0"
                                local:TileMenuNavigationManager.GridWidth="13"
                                local:TileMenuNavigationManager.GridHeight="16"
                                local:TileMenuNavigationManager.TileState="{x:Static local:TileState.Disabled}"/>
                        <local:FZButton x:Name="PART_Button_Accessibility"
                                DataContext="{StaticResource A_MenuDataItem_Accessibility}"
                                Style="{StaticResource A_Style_Button_ImageTile_TileColorScheme_Border}"
                                local:TileMenuNavigationManager.GridX="9"
                                local:TileMenuNavigationManager.GridY="0"
                                local:TileMenuNavigationManager.GridWidth="13"
                                local:TileMenuNavigationManager.GridHeight="16"
                                local:TileMenuNavigationManager.TileColorScheme="{x:Static local:TileColorScheme.Accessibility}"/>
                        
                        <local:DifficultyBonusInfographicTile x:Name="PART_Button_Infographic"
                                               Style="{StaticResource A_Style_Infographics_Button_Difficulty}"
                                               local:TileMenuNavigationManager.GridX="43"
                                               local:TileMenuNavigationManager.GridY="16">
                            <local:DifficultyBonusInfographicTile.DataContext>
                                <local:RadialInfographicData Title="{local:Loc TiledMenus.IDS_Infographics_DifficultyBonus}"
                                    Color="#00B18F"
                                    ProgressStringFormat="{x:Static local:InfographicStringFormat.PercentageAbsolute}"
                                    ForcePositiveSign="True"
                                    StatIcon="/ForzaUI;component/Textures/Data_Bound/Infographics/Difficulty_Bonus.png">
                                    <local:RadialInfographicData.LocalUserInfographicData>
                                        <local:UserInfographicData />
                                    </local:RadialInfographicData.LocalUserInfographicData>
                                </local:RadialInfographicData>
                            </local:DifficultyBonusInfographicTile.DataContext>
                        </local:DifficultyBonusInfographicTile>
                    </local:AutoSizeCanvas>
                </StackPanel>
            </Grid>
        </Border>
    </Grid>
</Page>
