<Page 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"
      xmlns:local="clr-namespace:ForzaUI"
      xmlns:ForzaUI="clr-namespace:ForzaUI"
      x:Name="page"
      x:Class="ForzaUI.A_DestinationArriveCutscene"
      mc:Ignorable="d"
      VerticalAlignment="Center"
      HorizontalAlignment="Center"
      RenderTransformOrigin="0.5,0.5"
      Style="{StaticResource A_Style_Page_Generic}"
      DataContext="{Binding RelativeSource={RelativeSource Self}}"
      >

    <Page.Resources>
        <ResourceDictionary>
            <Style x:Key="A_Style_FZTextBlock_Title_DestinationArrive" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_AnthemA}">
                <Setter Property="FontSize" Value="130" />
            </Style>

            <Style x:Key="A_Style_FZTextBlock_SubTitle_DestinationArrive" TargetType="local:FZTextBlock" BasedOn="{StaticResource A_Style_FZTextBlock_AnthemA}">
                <Setter Property="FontSize" Value="80" />
            </Style>

            <ControlTemplate x:Key="A_Template_WelcomeToDestination" TargetType="Control">
                <Grid VerticalAlignment="Center" HorizontalAlignment="Center">
                    <Grid.LayoutTransform>
                        <ScaleTransform ScaleX="0.75" ScaleY="0.75" />
                    </Grid.LayoutTransform>

                    <Viewbox Width="1920" Height="1080">
                        <StackPanel>
                            <local:FZTextBlock Text="{local:Loc MyProfile.IDS_Initial_Welcome}" Style="{StaticResource A_Style_FZTextBlock_SubTitle_DestinationArrive}" FontSize="60" Color="{StaticResource A_Color_PostRace_ARUI_Title}" Margin="5, 0, 0, 0" />
                            <local:FZTextBlock Text="{Binding DestinationName, FallbackValue=CASTELLETTO}" Style="{StaticResource A_Style_FZTextBlock_Title_DestinationArrive}" Color="{StaticResource A_Color_PostRace_ARUI_Content}" Margin="0, -23, 0, 0" />
                        </StackPanel>
                    </Viewbox>
                </Grid>
            </ControlTemplate>

            <ControlTemplate x:Key="A_Template_RoadTripComplete" TargetType="Control">
                <Grid VerticalAlignment="Center" HorizontalAlignment="Left" Margin="200, 256, 0, 0">
                    <Grid.LayoutTransform>
                        <ScaleTransform ScaleX="0.5" ScaleY="0.5" />
                    </Grid.LayoutTransform>
                    
                    <Viewbox Width="1920" Height="1080">
                        <StackPanel>                   
                            <local:FZTextBlock Text="{local:Loc RoadTrip.IDS_Title}"    Style="{StaticResource A_Style_FZTextBlock_Title_DestinationArrive}" Color="{StaticResource A_Color_PostRace_ARUI_Content}" />
                            <local:FZTextBlock Text="{local:Loc RoadTrip.IDS_Complete}" Style="{StaticResource A_Style_FZTextBlock_Title_DestinationArrive}" Color="{StaticResource A_Color_PostRace_ARUI_Content}" Margin="0, -37, 0, 0"  />
                        </StackPanel>
                    </Viewbox>
                </Grid>
            </ControlTemplate>

            <Style x:Key="A_Style_ArriveCutscene" TargetType="ContentControl">
                <Setter Property="Template" Value="{StaticResource A_Template_WelcomeToDestination}" />
                
                <Style.Triggers>
                    <DataTrigger Binding="{Binding IsFestival}" Value="True">
                        <Setter Property="Template" Value="{StaticResource A_Template_RoadTripComplete}" />
                    </DataTrigger>
                </Style.Triggers>
            </Style>
        </ResourceDictionary>
    </Page.Resources>

    <Grid>
        <ContentControl Style="{StaticResource A_Style_ArriveCutscene}" VerticalAlignment="Center" />
    </Grid>
</Page>