<Page x:Class="ForzaUI.Scenes.Anthem.A_GiftSummary"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    DataContext="{Binding RelativeSource={RelativeSource Self}}">
    <UIPageTransitionManager.TransitionManager>
        <UIPageTransitionManager
            Preset="{StaticResource A_UIPageTransitionManagerPreset_Popup}" />
    </UIPageTransitionManager.TransitionManager>
    <Page.Resources>
        <ResourceDictionary>
            <Style
                x:Key="A_Style_FZMaterial_Base_Thumbnail"
                TargetType="{x:Type local:FZMaterial}">
                <Setter
                    Property="Stretch"
                    Value="Uniform" />
                <Setter
                    Property="StretchDirection"
                    Value="Both" />
                <Setter
                    Property="GreedyMeasure"
                    Value="True" />
                <Setter
                    Property="HorizontalAlignment"
                    Value="Center" />
                <Setter
                    Property="Visibility"
                    Value="{Binding ShouldShowThumbnail, Converter={StaticResource A_FZBooleanToVisibilityConverter}}" />
                <Setter
                    Property="Height"
                    Value="0" />
                <Setter
                    Property="VerticalAlignment"
                    Value="Top"/>
            </Style>
            <Style
                x:Key="A_Style_FZMaterial_Sender_Thumbnail"
                TargetType="{x:Type local:FZMaterial}"
                BasedOn="{StaticResource A_Style_FZMaterial_Base_Thumbnail}">
                <Setter
                    Property="Height"
                    Value="300" />
            </Style>
            <Style
                x:Key="A_Style_FZMaterial_Receiver_Thumbnail"
                TargetType="{x:Type local:FZMaterial}"
                BasedOn="{StaticResource A_Style_FZMaterial_Base_Thumbnail}">
                <Setter
                    Property="Height"
                    Value="300" />
            </Style>
            <Style
                x:Key="A_Style_FZMaterial_UserProfile_RoundIcon"
                TargetType="{x:Type local:FZMaterial}"
                BasedOn="{StaticResource A_Style_FZMaterial_Base_Thumbnail}">
                <Setter
                    Property="Height"
                    Value="75" />
                <Setter
                     Property="Data">
                    <Setter.Value>
                        <FZGeometry
                            Data="M100,50A50,50,180,1,0,0,50A50,50,180,1,0,100,50z" />
                    </Setter.Value>
                </Setter>
            </Style>
            <Style 
                x:Key="A_Style_FZMaterial_TitleSeparator" 
                TargetType="{x:Type local:FZMaterial}">
                <Setter 
                    Property="Height" 
                    Value="2"/>
                <Setter 
                    Property="Color" 
                    Value="#FFFFFFFF"/>
                <Setter 
                    Property="Opacity" 
                    Value="0.2"/>
            </Style>
            <Style
                x:Key="A_Style_FZTextBlock_Sender_ContentHeader"
                TargetType="{x:Type local:FZTextBlock}">
                <Setter
                    Property="FontFamily"
                    Value="Horizon_C"/>
                <Setter
                    Property="CapHeight"
                    Value="18"/>
                <Setter
                    Property="Color"
                    Value="{StaticResource H_Color_Primary_White}"/>
                <Setter
                    Property="VerticalAlignment"
                    Value="Center"/>
                <Setter
                    Property="HorizontalAlignment"
                    Value="Left"/>
                <Setter
                    Property="Margin"
                    Value="24,10,24,0"/>
            </Style>
            <Style
                x:Key="A_Style_FZTextBlock_Sender_Content"
                TargetType="{x:Type local:FZTextBlock}">
                <Setter
                    Property="FontFamily"
                    Value="Horizon_D"/>
                <Setter
                    Property="CapHeight"
                    Value="21"/>
                <Setter
                    Property="Color"
                    Value="#A0F7F7F7"/>
                <Setter
                    Property="VerticalAlignment"
                    Value="Center"/>
                <Setter
                    Property="HorizontalAlignment"
                    Value="Left"/>
                <Setter
                    Property="Margin"
                    Value="24,9,24,25"/>
                <Setter 
                    Property="TextWrapping" 
                    Value="Wrap"/>
                <Setter
                    Property="LineAdjust"
                    Value="-0.3"/>
            </Style>

            <Style x:Key="A_Style_FZRun_BOLD" TargetType="local:FZRun">
                <Setter Property="FontFamily" Value="Horizon_C" />
            </Style>
            <Style x:Key="A_Style_FZRun_HIGHLIGHT" TargetType="local:FZRun">
                <Setter Property="Color" Value="{StaticResource H_Color_Primary_Yellow}" />
            </Style>
            <MappingConverter x:Key="A_MappingConverter_Text">
                <MappingConverterEntry Key="{NoCase HIGHLIGHT}" Value="{StaticResource A_Style_FZRun_HIGHLIGHT}" />
                <MappingConverterEntry Key="{NoCase BOLD}" Value="{StaticResource A_Style_FZRun_BOLD}" />
            </MappingConverter>

            <Style
                x:Key="A_Style_FZTextBlock_Receiver_Message"
                TargetType="{x:Type local:FZTextBlock}">
                <Setter
                    Property="FontFamily"
                    Value="Horizon_A"/>
                <Setter
                    Property="CapHeight"
                    Value="30"/>
                <Setter
                    Property="Color"
                    Value="{StaticResource H_Color_Primary_White}"/>
                <Setter
                    Property="VerticalAlignment"
                    Value="Center"/>
                <Setter
                    Property="HorizontalAlignment"
                    Value="Center"/>
                <Setter
                    Property="TextAlignment"
                    Value="Center"/>
                <Setter
                    Property="Margin"
                    Value="24,45,24,24"/>
                <Setter 
                    Property="MarkupConverter"
                    Value="{StaticResource A_MappingConverter_Text}"/>
                <Setter
                    Property="LineAdjust"
                    Value="-0.3"/>
            </Style>
            <Style
                x:Key="A_Style_FZTextBlock_Receiver_Content"
                TargetType="{x:Type local:FZTextBlock}">
                <Setter
                    Property="FontFamily"
                    Value="Horizon_D"/>
                <Setter
                    Property="CapHeight"
                    Value="15"/>
                <Setter
                    Property="Color"
                    Value="{StaticResource H_Color_Primary_White}"/>
                <Setter
                    Property="VerticalAlignment"
                    Value="Center"/>
                <Setter
                    Property="HorizontalAlignment"
                    Value="Center"/>
                <Setter
                    Property="Margin"
                    Value="30,7,30,20"/>
                <Setter
                    Property="TextWrapping"
                    Value="Wrap"/>
                <Setter
                    Property="TextAlignment"
                    Value="Center"/>
                <Setter
                    Property="LineStackingStrategy"
                    Value="BlockLineHeight"/>
                <Setter 
                    Property="MarkupConverter"
                    Value="{StaticResource A_MappingConverter_Text}"/>
                <Setter
                    Property="LineAdjust"
                    Value="-0.3"/>
            </Style>

            <Style TargetType="{x:Type local:FZTextBlock}"
                   x:Key="A_Style_FZTextBlock_Reciever_CarDetails">
                <Setter Property="LineAdjust"
                        Value="-0.35" />
                <Setter Property="VerticalAlignment"
                        Value="Top" />
                <Setter Property="HorizontalAlignment"
                        Value="Center"/>
                <Setter Property="StretchDirection"
                        Value="DownOnly" />
                <Setter Property="CapHeight"
                        Value="23" />
                <Setter Property="Color"
                        Value="{StaticResource H_Color_Primary_Grey_80pc}" />
                <Setter Property="TextWrapping"
                        Value="Wrap" />
                <Setter Property="TextAlignment"
                        Value="Left" />
                <Setter Property="TextTrimming"
                    Value="CharacterEllipsis" />
                <Setter Property="ClipToBounds"
                        Value="False"/>
                <Setter Property="Stretch"
                        Value="None"/>
                <Setter Property="AutoScroll"
                        Value="{StaticResource A_AutoScrollSettings_CarName}"/>
            </Style>

            <Style x:Key="A_Style_FZMaterial_Background"
                   BasedOn="{StaticResource H_Style_Container_GlassHighBlur_Description}"
                   TargetType="{x:Type local:FZMaterial}">
                <Setter Property="Margin"
                        Value="0,0,0,4"/>
            </Style>

            <Style x:Key="A_Style_FZTextBlock_GiftDetails"
                   TargetType="{x:Type local:FZTextBlock}">
                <Setter Property="Margin"
                        Value="25,16,0,16"/>
                <Setter Property="CapHeight"
                        Value="18"/>
                <Setter Property="VerticalAlignment"
                        Value="Center"/>
                <Setter Property="FontFamily"
                        Value="Horizon_B"/>
                <Setter Property="Color"
                        Value="{StaticResource H_Color_Primary_Grey_80pc}"/>
            </Style>

            <DataTemplate DataType="{Type GiftDataItemSender}">
                <StackPanel>
                    <FZMaterial Style="{StaticResource A_Style_FZMaterial_Background}">
                        <StackPanel Margin="0,20,0,50">
                            <FZTextBlock
                                x:Name="CarName"
                                Text="{Binding CarName}"
                                Style="{StaticResource A_Style_FZTextBlock_Reciever_CarDetails}"
                                Color="{StaticResource H_Color_Primary_White}"
                                />
                            <FZTextBlock FontFamily="Horizon_B"
                                        Style="{StaticResource A_Style_FZTextBlock_Reciever_CarDetails}"
                                        VerticalAlignment="Center"
                                        Margin="0,12,0,0">
                                <FZRun Text="{Binding CarYear}"
                                            FontFamily="Horizon_B"/>
                                <FZRun Text=" " />
                                <FZRun Text="{Binding CarManufacturer}"/>
                            </FZTextBlock>
                            <FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/DotPatternA.png"
                                        GetSizeFromTexture="True"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Margin="0,25,0,0">
                                <FZMaterial
                                    Style="{StaticResource A_Style_FZMaterial_Sender_Thumbnail}"
                                    ImageSource="{Binding Thumbnail}"
                                    Margin="0,-60,0,0"/>
                            </FZMaterial>
                        </StackPanel>
                    </FZMaterial>
                    <!-- <FZMaterial Style="{StaticResource A_Style_FZMaterial_Background}" >
                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_GiftDetails}" >
                            <FZRun Text="{Loc BarnFindBlueprint.IDS_Popup_SenderSummary_NameHeader}"/>
                            <FZRun Text=" " />
                            <FZRun Text="{Binding Name}"
                                   FontFamily="Horizon_A"
                                   Color="{StaticResource H_Color_Primary_White}"/>
                        </FZTextBlock>
                    </FZMaterial> -->
                    <FZMaterial Style="{StaticResource A_Style_FZMaterial_Background}" >
                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_GiftDetails}" >
                            <FZRun Text="{Loc BarnFindBlueprint.IDS_Popup_SenderSummary_GroupHeader}"/>
                            <FZRun Text=" " />
                            <FZRun Text="{Binding Group}"
                                   FontFamily="Horizon_A"
                                   Color="{StaticResource H_Color_Primary_White}"/>
                        </FZTextBlock>
                    </FZMaterial>
                    <FZMaterial Style="{StaticResource A_Style_FZMaterial_Background}" >
                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_GiftDetails}" >
                            <FZRun Text="{Loc BarnFindBlueprint.IDS_Popup_SenderSummary_MessageHeader}"/>
                            <FZRun Text=" " />
                            <FZRun Text="{Binding Message}"
                                   FontFamily="Horizon_A"
                                   Color="{StaticResource H_Color_Primary_White}"/>
                        </FZTextBlock>
                    </FZMaterial>
                    <FZMaterial Style="{StaticResource A_Style_FZMaterial_Background}" >
                        <FZTextBlock Style="{StaticResource A_Style_FZTextBlock_GiftDetails}" >
                            <FZRun Text="{Loc BarnFindBlueprint.IDS_Popup_SenderSummary_SignHeader}"/>
                            <FZRun Text=" " />
                            <FZRun Text="{Binding Signature}"
                                   FontFamily="Horizon_A"
                                   Color="{StaticResource H_Color_Primary_White}"/>
                        </FZTextBlock>
                    </FZMaterial>
                </StackPanel>
            </DataTemplate>
            <DataTemplate DataType="{Type GiftDataItemReceiver}">
                <ContentControl Style="{StaticResource A_Style_ContentControl_PopupContentBlock}">
                        <StackPanel Margin="0,23,0,0">
                            <FZTextBlock 
                                x:Name="CarName"
                                Text="{Binding CarName}"
                                Style="{StaticResource A_Style_FZTextBlock_Reciever_CarDetails}"
                                Color="{StaticResource H_Color_Primary_White}"
                                />
                            <FZTextBlock FontFamily="Horizon_B"
                                         Style="{StaticResource A_Style_FZTextBlock_Reciever_CarDetails}"
                                         VerticalAlignment="Center"
                                         Margin="0,12,0,0">
                                <FZRun Text="{Binding CarYear}"
                                             FontFamily="Horizon_B"/>
                                <FZRun Text=" " />
                                <FZRun Text="{Binding CarManufacturer}"/>
                            </FZTextBlock>
                            <FZMaterial ImageSource="/ForzaUI;component/Textures/Anthem/DotPatternA.png"
                                        GetSizeFromTexture="True"
                                        HorizontalAlignment="Center"
                                        VerticalAlignment="Center"
                                        Margin="0,25,0,0">
                                <FZMaterial
                                    Style="{StaticResource A_Style_FZMaterial_Receiver_Thumbnail}"
                                    ImageSource="{Binding Thumbnail}"
                                    Margin="0,-60,0,0"/>
                            </FZMaterial>
                            <FZTextBlock 
                                x:Name="Message"
                                Text="{Binding Message}"
                                Style="{StaticResource A_Style_FZTextBlock_Receiver_Message}"
                                />
                            <FZTextBlock 
                                x:Name="Sender"
                                Text="{Binding Sender}"
                                Style="{StaticResource A_Style_FZTextBlock_Receiver_Content}"/>
                    </StackPanel>
                </ContentControl>
            </DataTemplate>
        </ResourceDictionary>
    </Page.Resources>
    <Grid>
        <FZMaterialGlassCapture />
        <FZMaterial
            Style="{StaticResource A_Style_FZMaterial_Popup_Background}" />
        <ContentControl
            x:Name="BottomBar"
            Style="{StaticResource A_Style_ButtonBar}">
            <ControllerButtonPanel
                x:Name="PART_HelpPanel"
                Layout="RightToLeft"
                HorizontalAlignment="Left"
                VerticalAlignment="Bottom"
                Background="{Null}" />
        </ContentControl>
        <Grid
            Style="{StaticResource A_Style_FrameworkElement_LayoutRoot}">
            <StackPanel
                x:Name="MainContent"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Style="{StaticResource A_Style_FrameworkElement_DefaultTransition_0}"
                Width="{StaticResource H_Width_PopUp}">
                <ContentControl
                    x:Name="GiftSummaryTitle"
                    Content="{Binding Title}"
                    Style="{StaticResource A_Style_ContentControl_PopupTitleBlock}" />
                <ContentControl HorizontalContentAlignment="Stretch"
                                Content="{Binding Gift}"/>
                <CommonListBox
                    x:Name="PART_Menu"
                    DockPanel.Dock="Bottom"
                    Style="{StaticResource A_Style_ListBox_TextMenu_Default}"
                    ItemsSource="{Binding Options}" />
            </StackPanel>
        </Grid>
    </Grid>
</Page>
