<UserControl x:Class="Apollon.WPF.Views.Components.OverviewDetails"
             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:Apollon.WPF.Views.Components"
             xmlns:converter="clr-namespace:Apollon.WPF.Views.Components"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">     
    <Grid>
        
        <Border BorderBrush="#0000a0"
                BorderThickness="1"
                CornerRadius="10">
        </Border>

        <TextBlock Grid.RowSpan="6" 
                       TextAlignment="Center"
                       VerticalAlignment="Center"
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="16"
                       Foreground="#0000a0"
                       Padding="25"
                       TextWrapping="WrapWithOverflow">
            <TextBlock.Style>
                <Style TargetType="TextBlock">
                    <Setter Property="Visibility" Value="Hidden"/> 
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding HasSelectedTournament}" Value="false">
                            <Setter Property="Visibility" Value="Visible"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </TextBlock.Style>
            klicke auf <LineBreak/> Neues Turnier vorbereiten <LineBreak/><LineBreak/> oder wähle ein vorhandenes Turnier aus um es zu bearbeiten!
        </TextBlock>             
            <StackPanel Margin="10">
            <WrapPanel HorizontalAlignment="Center">
                <StackPanel>
                    <TextBlock Text="{Binding TournamentName}"
                       TextAlignment="Left"
                               Width="200"
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0"
                       TextWrapping="WrapWithOverflow">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="Visibility" Value="Hidden"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                        <Setter Property="Visibility" Value="Visible"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>

                    <TextBlock Text="{Binding Organisation}"
                       TextAlignment="Left"
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0"
                               Width="200"
                               TextWrapping="WrapWithOverflow"
                       Margin="10">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="Visibility" Value="Hidden"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                        <Setter Property="Visibility" Value="Visible"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>
                </StackPanel>
                <Image Grid.Column="2"
               Grid.Row="2"
               Source="{Binding Logo}"               
               Width="50"
               Height="50">
                    <Image.Style>
                        <Style TargetType="Image">
                            <Setter Property="Visibility" Value="Hidden"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                    <Setter Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Image.Style>

                </Image>
            </WrapPanel>
               
            <WrapPanel HorizontalAlignment="Center">
                <TextBlock Text="{Binding Competition}"
                       TextAlignment="Center"
                       VerticalAlignment="Center"
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0"
                       Margin="10">
                    <TextBlock.Style>
                        <Style TargetType="TextBlock">
                            <Setter Property="Visibility" Value="Hidden"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                    <Setter Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Style>
                </TextBlock>
                <Image Grid.Column="2"
               Grid.Row="2"
               Source="{Binding CompetitionImage}"               
               Width="50"
               Height="50">                    
                    <Image.Style>
                        <Style TargetType="Image">                            
                            <Setter Property="Visibility" Value="Hidden"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                    <Setter Property="Visibility" Value="Visible"/>                                    
                                </DataTrigger>
                            </Style.Triggers>                            
                         </Style>
                    </Image.Style>
                    
                </Image>
            </WrapPanel>              

            <WrapPanel Margin="10" HorizontalAlignment="Center"> 
                    <TextBlock Text="{Binding StartDate}"
                       TextAlignment="Center"
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0"
                       Margin="0 0 5 0">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="Visibility" Value="Hidden"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                        <Setter Property="Visibility" Value="Visible"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>
                    <TextBlock Text="bis "
                       TextAlignment="Center"
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="Visibility" Value="Hidden"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                        <Setter Property="Visibility" Value="Visible"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>
                    <TextBlock Text="{Binding EndDate}"
                       TextAlignment="Center"
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0">
                        <TextBlock.Style>
                            <Style TargetType="TextBlock">
                                <Setter Property="Visibility" Value="Hidden"/>
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                        <Setter Property="Visibility" Value="Visible"/>
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </TextBlock.Style>
                    </TextBlock>
                </WrapPanel>

                <TextBlock Text="{Binding Location}"
                       TextAlignment="Center"
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0"
                       Margin="10">
                    <TextBlock.Style>
                        <Style TargetType="TextBlock">
                            <Setter Property="Visibility" Value="Hidden"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                    <Setter Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Style>
                </TextBlock>
            <WrapPanel HorizontalAlignment="Center">
                <TextBlock Text="Durchgänge:"                       
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0"
                       Margin="10">
                    <TextBlock.Style>
                        <Style TargetType="TextBlock">
                            <Setter Property="Visibility" Value="Hidden"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                    <Setter Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Style>
                </TextBlock>
                <TextBlock Text="{Binding Rounds}"                       
                       FontFamily="Arial"
                       FontWeight="Bold"
                       FontSize="14"
                       Foreground="#0000a0"
                       Margin="10">
                    <TextBlock.Style>
                        <Style TargetType="TextBlock">
                            <Setter Property="Visibility" Value="Hidden"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                    <Setter Property="Visibility" Value="Visible"/>
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Style>
                </TextBlock>
            </WrapPanel>
            <Button 
                    Content="Turnier öffnen"
                    FontSize="16"
                    Height="40"
                    Width="150"
                    Margin="20"
                    Cursor="Hand"
                    Command="{Binding NavigateNavBarCommand}">
                 <Button.Style>                     
                        <Style TargetType="Button" BasedOn="{StaticResource ModernButton}">
                            <Setter Property="Visibility" Value="Hidden"/>
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding HasSelectedTournament}" Value="True">
                                    <Setter Property="Visibility" Value="Visible"/>
                                </DataTrigger>                            
                            </Style.Triggers>
                        </Style>
                    </Button.Style>
            </Button>
        </StackPanel>       
    </Grid>
</UserControl>
