<Window x:Class="ServerManagerTool.PlayerProfileWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Width="500" ResizeMode="NoResize" SizeToContent="Height" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
        Icon="../Art/favicon.ico" Title="{Binding WindowTitle}">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="..\Globalization\en-US\en-US.xaml"/>
                <ResourceDictionary Source="..\Styles\Default.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <Grid Background="{StaticResource BeigeGradient}">
        <StackPanel Margin="3" CanVerticallyScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="2*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>

                <Label Grid.Row="0" Grid.Column="0" Content="{DynamicResource Profile_NameLabel}"/>
                <Label Grid.Row="0" Grid.Column="1" Content="{Binding Player.PlayerName}"/>
                <Label Grid.Row="1" Grid.Column="0" Content="{DynamicResource Profile_OnlineLabel}"/>
                <Label Grid.Row="1" Grid.Column="1" Content="{Binding Player.IsOnline}" Style="{DynamicResource Online}"/>
                <Label Grid.Row="2" Grid.Column="0" Content="{DynamicResource Profile_CreatedLabel}"/>
                <Label Grid.Row="2" Grid.Column="1" Content="{Binding CreatedDate}"/>
                <Label Grid.Row="3" Grid.Column="0" Content="{DynamicResource Profile_UpdatedLabel}"/>
                <Label Grid.Row="3" Grid.Column="1" Content="{Binding UpdatedDate}"/>
            </Grid>
            
            <GroupBox  HorizontalAlignment="Stretch" Style="{StaticResource GroupBoxStyle}">
                <GroupBox.Header>
                    <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{DynamicResource Profile_PlayerSectionLabel}" VerticalAlignment="Center" FontWeight="Bold" FontSize="13.333"/>
                </GroupBox.Header>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Label Grid.Row="0" Content="{DynamicResource Profile_IdLabel}"/>
                    <TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" ToolTip="{DynamicResource Profile_NavigateProfile}">
                        <Hyperlink NavigateUri="{Binding PlayerLink}" Command="{Binding ExplorerLinkCommand}" CommandParameter="{Binding PlayerLink}">
                           <Hyperlink.Inlines>
                                <Run Text="{Binding PlayerData.CharacterId}"/>
                           </Hyperlink.Inlines>
                        </Hyperlink>
                    </TextBlock>
                    <Label Grid.Row="1" Content="{DynamicResource Profile_NameLabel}"/>
                    <Label Grid.Row="1" Grid.Column="1" Content="{Binding PlayerData.CharacterName}"/>
                    <Label Grid.Row="2" Content="{DynamicResource Profile_LevelLabel}"/>
                    <Label Grid.Row="2" Grid.Column="1" Content="{Binding PlayerData.Level}"/>
                    <Label Grid.Row="3" Content="{DynamicResource Profile_WhitelistedLabel}"/>
                    <Label Grid.Row="3" Grid.Column="1" Content="{Binding Player.IsWhitelisted}" Style="{DynamicResource Whitelisted}"/>
                </Grid>
            </GroupBox>
            
            <GroupBox  HorizontalAlignment="Stretch" Style="{StaticResource GroupBoxStyle}">
                <GroupBox.Header>
                    <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{DynamicResource Profile_TribeSectionLabel}" VerticalAlignment="Center" FontWeight="Bold" FontSize="13.333"/>
                </GroupBox.Header>
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition/>
                        <RowDefinition/>
                        <RowDefinition/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Label Grid.Row="0" Content="{DynamicResource Profile_IdLabel}"/>
                    <TextBlock Grid.Row="0" Grid.Column="1" HorizontalAlignment="Left" VerticalAlignment="Center" ToolTip="{DynamicResource Profile_NavigateProfile}">
                        <Hyperlink NavigateUri="{Binding TribeLink}" Command="{Binding ExplorerLinkCommand}" CommandParameter="{Binding TribeLink}">
                           <Hyperlink.Inlines>
                                <Run Text="{Binding TribeData.Id}"/>
                           </Hyperlink.Inlines>
                        </Hyperlink>
                    </TextBlock>
                    <Label Grid.Row="1" Content="{DynamicResource Profile_NameLabel}"/>
                    <Label Grid.Row="1" Grid.Column="1" Content="{Binding TribeData.Name}"/>
                    <Label Grid.Row="2" Content="{DynamicResource Profile_TribeOwnerLabel}"/>
                    <Label Grid.Row="2" Grid.Column="1" Content="{Binding TribeOwner}"/>
                </Grid>
            </GroupBox>
        </StackPanel>
    </Grid>
</Window>
