<Page x:Class="ForzaUI.Scenes.Anthem.A_DesignSearch"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:System="clr-namespace:System;assembly=mscorlib"
      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"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}">

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

    <Page.Resources>
        <ResourceDictionary>
        </ResourceDictionary>
    </Page.Resources>
    <Grid x:Name="LayoutRoot">
        <!-- Background Blur -->
        <local:FZMaterialGlassCapture />
        <local:FZMaterial Style="{StaticResource A_Style_FZMaterial_Popup_Background}"/>

        <!-- Help Button Bar -->
        <ContentControl x:Name="BottomBar" Style="{StaticResource A_Style_ButtonBar}">
            <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>

        <Grid Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <StackPanel Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Width="{StaticResource A_Double_SettingsBox_Width}">
                <ContentControl Style="{StaticResource A_Style_ContentControl_PopupTitleBlock}"
                                    Content="{Binding Title}" />
                <ContentControl Style="{StaticResource A_Style_ContentControl_PopupContentBlock}">
                    <Grid>
                        <StackPanel Visibility="{Binding IsSearching, Converter={StaticResource A_Converter_BoolToVis}}">
                            <local:FZTextBlock Text="{Binding SearchMessage}"
                                                   Style="{StaticResource A_Style_FZTextBlock_PopupText}" Margin="20,0,20,38"/>
                            <ProgressBar x:Name="IdleIndicator"
                                             IsIndeterminate="True"
                                             Style="{StaticResource A_Style_ProgressBar_WaitSpinner}"
                                             Height="56"
                                             Margin="0,0,0,16" />
                        </StackPanel>
                        <Grid>
                            <StackPanel x:Name="MainContent"
                            HorizontalAlignment="Center"
                            VerticalAlignment="Center"
                            Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}">
                                <local:CommonListBox x:Name="CommonListBox_SpinnerContainer"
                                                 Visibility="{Binding IsSearching, Converter={StaticResource A_Converter_BoolToVis_Inverted}}"
                                                 Style="{StaticResource A_Style_ListBox_TextMenu_Default}"
                                                 Focusable="False"
                                                 KeyboardNavigation.DirectionalNavigation="Contained">
                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}">
                                        <local:SpinnerControl x:Name="LayersSpinner"
                                                            Label="{local:Loc Storefront.IDS_Layers}"
                                                            Style="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
                                                            ItemsSource="{Binding LayersOptions}"
                                                            Visibility="{Binding ShowLayers, Converter={StaticResource A_Converter_BoolToVis}}" />
                                    </ListBoxItem>
                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}">
                                        <local:SpinnerControl x:Name="MakeSpinner"
                                                            Label="{local:Loc Storefront.IDS_Make}"
                                                            Style="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
                                                            ItemsSource="{Binding MakeOptions}"
                                                            Visibility="{Binding ShowMake, Converter={StaticResource A_Converter_BoolToVis}}" />
                                    </ListBoxItem>

                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}">
                                        <local:SpinnerControl x:Name="ModelSpinner"
                                                            Label="{local:Loc Storefront.IDS_Model}"
                                                            Style="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
                                                            ItemsSource="{Binding ModelOptions}"
                                                            Visibility="{Binding ShowModel, Converter={StaticResource A_Converter_BoolToVis}}" />
                                    </ListBoxItem>

                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}">
                                        <local:SpinnerControl x:Name="CarClassSpinner"
                                                            Label="{local:Loc Storefront.IDS_CarClass}"
                                                            Style="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
                                                            ItemsSource="{Binding CarClassOptions}"
                                                            Visibility="{Binding ShowCarClass, Converter={StaticResource A_Converter_BoolToVis}}" />
                                    </ListBoxItem>

                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}">
                                        <local:SpinnerControl x:Name="Keyword1Spinner"
                                                            Label="{local:Loc Storefront.IDS_Keyword1}"
                                                            Style="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
                                                            ItemsSource="{Binding Keyword1Options}" />
                                    </ListBoxItem>

                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}">
                                        <local:SpinnerControl x:Name="Keyword2Spinner"
                                                            Label="{local:Loc Storefront.IDS_Keyword2}"
                                                            Style="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
                                                            ItemsSource="{Binding Keyword2Options}" />
                                    </ListBoxItem>

                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}">
                                        <local:SpinnerControl x:Name="CreatorSpinner"
                                                            Label="{local:Loc Storefront.IDS_LabelCreatorButton}"
                                                            Style="{StaticResource A_Style_SpinnerControl_Default_InItemsList}"
                                                            ItemsSource="{Binding LabelCreatorOptions}"
                                                            Visibility="{Binding ShowCreator, Converter={StaticResource A_Converter_BoolToVis}}" />
                                    </ListBoxItem>

                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}">
                                        <local:SpinnerControl x:Name="DescriptionSpinner"
                                                            Label="{local:Loc Storefront.IDS_LabelDescriptionButton}"
                                                            Style="{StaticResource A_Style_SpinnerControl_Default_InItemsList_Ellipsis}"
                                                            ItemsSource="{Binding LabelDescriptionOptions}" />
                                    </ListBoxItem>

                                    <ListBoxItem Style="{StaticResource A_Style_ListBoxItem_TextMenu_NotFocusable}" Margin="0, 6, 0, 3">
                                        <local:FZButton x:Name="ActionButton"
                                                Content="{Binding ActionText}"
                                                Template="{StaticResource A_ControlTemplate_Button_TextMenu}" />
                                    </ListBoxItem>
                                </local:CommonListBox>
                            </StackPanel>
                        </Grid>
                    </Grid>
                </ContentControl>
            </StackPanel>
        </Grid>
    </Grid>
</Page>
