<Page x:Class="ForzaUI.Scenes.Anthem.A_RivalsStreetRaceEventTypeSelect"
      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"
      mc:Ignorable="d"
      xmlns:local="clr-namespace:ForzaUI;assembly="
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <Page.Resources>
        <ResourceDictionary>

            <local:TileMenuDataItem x:Key="A_TileMenuDataItem_StreetRace"
                                    Heading="{local:Loc Rivals.IDS_StreetRaces}"                                   
                                    Icon="/ForzaUI;component/Textures/Anthem/Rivals/StreetRace.png"
                                    UseAlternateColors="True" />

            <Style x:Key="A_Style_Button_StreetRace" TargetType="local:FZButton" BasedOn="{StaticResource A_Style_Button_Tile_6x2}">
                <Setter Property="DataContext" Value="{StaticResource A_TileMenuDataItem_StreetRace}"/>
            </Style>

            <local:TileMenuDataItem x:Key="A_TileMenuDataItem_MidnightBattle"
                                    Heading="{local:Loc Rivals.IDS_MidnightBattles}"
                                    Icon="/ForzaUI;component/Textures/Anthem/Rivals/MidnightBattle.png"
                                    UseAlternateColors="True" />

            <local:TileMenuDataItem x:Key="A_TileMenuDataItem_MidnightBattleLocked"                                    
                                    Icon="/ForzaUI;component/Textures/Anthem/Rivals/MidnightBattleLocked.png" />
            
            <!-- Since this button may get locked, need a trigger to change the background image -->
            <Style x:Key="A_Style_Button_MidnightBattle" TargetType="local:FZButton" BasedOn="{StaticResource A_Style_Button_Tile_6x2}">
                <Setter Property="DataContext" Value="{StaticResource A_TileMenuDataItem_MidnightBattle}"/>
                <Style.Triggers>
                    <Trigger Property="local:TileMenuNavigationManager.LockState" Value="{x:Static local:LockState.Locked}">
                        <Setter Property="DataContext" Value="{StaticResource A_TileMenuDataItem_MidnightBattleLocked}"/>
                    </Trigger>
                </Style.Triggers>
            </Style>
            
        </ResourceDictionary>
    </Page.Resources>

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

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

        <local:PlayerBarControl x:Name="TopBar" Style="{StaticResource A_Style_PlayerBarControl}" />
        <ContentControl Style="{StaticResource A_Style_ButtonBar}"
                        Width="Auto">
            <ContentControl x:Name="DefaultHelpPanel"
                            local:ControllerButtonPanel.ADescription="{local:Loc HelpButtons.IDS_Select}"
                            local:ControllerButtonPanel.BDescription="{local:Loc HelpButtons.IDS_Back}"
                            Style="{StaticResource A_Style_ContentControl_DefaultButtonBar}" />
        </ContentControl>

        <Border Style="{StaticResource A_Style_Border_ScenePadding}">
            <Grid x:Name="LayoutRoot" KeyboardNavigation.DirectionalNavigation="Contained">
                <Grid Style="{StaticResource A_Style_FrameworkElement_ScreenTilt}" Margin="0,0,0,0">
                    <StackPanel Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center">
                        <StackPanel Orientation="Horizontal" Margin="0,0" Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                            <ContentControl Content="{local:Loc ScreenTitles.IDS_Rivals_StreetRaceEventTypeSelect_Title}" Style="{StaticResource A_Style_ContentControl_ScreenTitleBlock}"
                                            local:BindingProxy.A="/ForzaUI;component/Textures/Anthem/Icons/Titles/Rivals.png"/>
                        </StackPanel>

                        <StackPanel x:Name="PART_MenuContent" RenderTransformOrigin="0.5,0.5" Margin="0,0,0,0">
                            <local:AutoSizeCanvas x:Name="PART_SCOPE_Home">
                                <local:FZButton x:Name="PART_Button_StreetRace"
                                        local:TileMenuNavigationManager.GridX="0"
                                        local:TileMenuNavigationManager.GridY="0"
                                        Style="{StaticResource A_Style_Button_StreetRace}"
                                        Template="{StaticResource A_ControlTemplate_RivalsDestinationTile}"
                                        local:UIPageTransitionManager.TransitionIndex="0"
                                        DataContext="{StaticResource A_TileMenuDataItem_StreetRace}"/>
                                
                                <local:FZButton x:Name="PART_Button_MidnightBattle"
                                        local:TileMenuNavigationManager.GridX="0"
                                        local:TileMenuNavigationManager.GridY="2"
                                        Style="{StaticResource A_Style_Button_MidnightBattle}"
                                        Template="{StaticResource A_ControlTemplate_RivalsDestinationTile}"
                                        local:UIPageTransitionManager.TransitionIndex="1"/>
                            </local:AutoSizeCanvas>
                        </StackPanel>
                    </StackPanel>
                </Grid>
            </Grid>
        </Border>

    </Grid>
</Page>
