<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:av="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        mc:Ignorable="av"
        x:Class="NBAManagment.TeamsMain"
        Title="Teams Main" Height="600" Width="1200" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <!-- Заголовок окна -->
        <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
            <TextBlock Text="NBA Teams" VerticalAlignment="Center" FontSize="30" Margin="10" FontFamily="Segoe UI" FontWeight="Bold" Foreground="DarkSlateGray"/>
        </StackPanel>

        <!-- Вкладки с конференциями -->
        <TabControl Grid.Row="1"  Background="White" BorderBrush="White">
            <TabItem Header="Eastern" Style="{StaticResource TabItemStyle}" VerticalAlignment="Center" HorizontalAlignment="Center" Height="25" Width="100" >
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <!-- Атлантический дивизион -->
                    <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" >
                        <StackPanel>
                            <TextBlock Text="Atlantic" FontSize="35" Margin="5" FontFamily="Segoe UI" HorizontalAlignment="Center" FontWeight="Bold"  Height="43" Foreground="Black"/>

                            <ListView x:Name="lvTeamAtlantic">
                                <ListView.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="64"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>

                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="35"/>
                                                <RowDefinition Height="35"/>
                                            </Grid.RowDefinitions>
                                            <Image Source="{Binding Logo}" Width="60" Height="60" Grid.RowSpan="2"/>

                                            <TextBlock 
                                                    Grid.Row="0"
                                                    Grid.Column="1"
                                                    Grid.ColumnSpan="3"
                                                    Text="{Binding TeamName}"
                                                    Margin="5"/>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="1"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_17">
                                                    Roaster
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="2"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_16">
                                                    Matchup
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="3"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_15">
                                                    First lineup
                                                </Hyperlink>
                                            </TextBlock>
                                        </Grid>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                            </ListView>
                        </StackPanel>
                    </Border>

                    <!-- Центральный дивизион -->
                    <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1">
                        <StackPanel>
                            <TextBlock Text="Central" FontSize="35" Margin="5" FontFamily="Segoe UI" HorizontalAlignment="Center" FontWeight="Bold"  Height="43" Foreground="Black"/>

                            <ListView x:Name="lvTeamCentral">
                                <ListView.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="64"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>

                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="35"/>
                                                <RowDefinition Height="35"/>
                                            </Grid.RowDefinitions>
                                            <Image Source="{Binding Logo}" Width="60" Height="60" Grid.RowSpan="2"/>

                                            <TextBlock 
                                                    Grid.Row="0"
                                                    Grid.Column="1"
                                                    Grid.ColumnSpan="3"
                                                    Text="{Binding TeamName}"/>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="1"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_14">
                                                    Roster
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="2"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_13">
                                                    Matchup
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="3"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_12">
                                                    First lineup
                                                </Hyperlink>
                                            </TextBlock>
                                        </Grid>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                            </ListView>
                        </StackPanel>
                    </Border>

                    <!-- Юго-восточный дивизион -->
                    <Border Grid.Column="2" BorderBrush="Black" BorderThickness="1" >
                        <StackPanel>
                            <TextBlock Text="Southeast" FontSize="35" Margin="5" FontFamily="Segoe UI" HorizontalAlignment="Center" FontWeight="Bold"  Height="43" Foreground="Black"/>

                            <ListView x:Name="lvTeamSoutheastl">
                                <ListView.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="64"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>

                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="35"/>
                                                <RowDefinition Height="35"/>
                                            </Grid.RowDefinitions>
                                            <Image Source="{Binding Logo}" Width="60" Height="60" Grid.RowSpan="2"/>

                                            <TextBlock 
                                                    Grid.Row="0"
                                                    Grid.Column="1"
                                                    Grid.ColumnSpan="3"
                                                    Text="{Binding TeamName}"/>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="1"
                                                    Margin="5">

                                                <Hyperlink Click="Hyperlink_Click">
                                                    Roaster
                                                </Hyperlink>
                                                
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="2"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_18">
                                                   Matchup
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="3"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_2">
                                                   First lineup
                                                </Hyperlink>
                                            </TextBlock>
                                        </Grid>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                            </ListView>
                        </StackPanel>
                    </Border>
                </Grid>
            </TabItem>
            <TabItem  Header="Western" Style="{StaticResource TabItemStyle}" VerticalAlignment="Center" HorizontalAlignment="Center" Height="25" Width="100">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>

                    <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" >
                        <StackPanel>
                            <TextBlock Text="Southwestern" FontSize="35" Margin="5" FontFamily="Segoe UI" HorizontalAlignment="Center" FontWeight="Bold"  Height="43" Foreground="Black"/>

                            <ListView x:Name="lvTeamSouthwestern">
                                <ListView.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="64"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>

                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="35"/>
                                                <RowDefinition Height="35"/>
                                            </Grid.RowDefinitions>
                                            <Image Source="{Binding Logo}" Width="60" Height="60" Grid.RowSpan="2"/>

                                            <TextBlock 
                                                    Grid.Row="0"
                                                    Grid.Column="1"
                                                    Grid.ColumnSpan="3"
                                                    Text="{Binding TeamName}"
                                                    Margin="5"/>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="1"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_3">
                                                    Roaster
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="2"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_4">
                                                    Matchup
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="3"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_5">
                                                    First lineup
                                                </Hyperlink>
                                            </TextBlock>
                                        </Grid>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                            </ListView>
                        </StackPanel>
                    </Border>

                    <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1">
                        <StackPanel>
                            <TextBlock Text="Northwestern" FontSize="35" Margin="5" FontFamily="Segoe UI" HorizontalAlignment="Center" FontWeight="Bold"  Height="43" Foreground="Black"/>

                            <ListView x:Name="lvTeamNorthwestern">
                                <ListView.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="64"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>

                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="35"/>
                                                <RowDefinition Height="35"/>
                                            </Grid.RowDefinitions>
                                            <Image Source="{Binding Logo}" Width="60" Height="60" Grid.RowSpan="2"/>


                                            <TextBlock 
                                                    Grid.Row="0"
                                                    Grid.Column="1"
                                                    Grid.ColumnSpan="3"
                                                    Text="{Binding TeamName}"/>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="1"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_6">
                                                    Roaster
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="2"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_7">
                                                    Matchup
                                                </Hyperlink>
                                            </TextBlock>
                                            
                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="3"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_8">
                                                    First lineup
                                                </Hyperlink>
                                            </TextBlock>
                                        </Grid>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                            </ListView>
                        </StackPanel>
                    </Border>

                    <Border Grid.Column="2" BorderBrush="Black" BorderThickness="1" >
                        <StackPanel>
                            <TextBlock Text="Pacific" FontSize="35" Margin="5" FontFamily="Segoe UI" HorizontalAlignment="Center" FontWeight="Bold"  Height="43" Foreground="Black"/>

                            <ListView x:Name="lvTeamPacific">
                                <ListView.ItemTemplate>
                                    <DataTemplate>
                                        <Grid>
                                            <Grid.ColumnDefinitions>
                                                <ColumnDefinition Width="64"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                                <ColumnDefinition Width="*"/>
                                            </Grid.ColumnDefinitions>

                                            <Grid.RowDefinitions>
                                                <RowDefinition Height="35"/>
                                                <RowDefinition Height="35"/>
                                            </Grid.RowDefinitions>
                                            <Image Source="{Binding Logo}" Width="60" Height="60" Grid.RowSpan="2"/>


                                            <TextBlock 
                                                    Grid.Row="0"
                                                    Grid.Column="1"
                                                    Grid.ColumnSpan="3"
                                                    Text="{Binding TeamName}"/>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="1"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_9">
                                                    Roaster
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="2"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_10">
                                                    Matchup
                                                </Hyperlink>
                                            </TextBlock>

                                            <TextBlock
                                                    Grid.Row="1"
                                                    Grid.Column="3"
                                                    Margin="5">
                                                <Hyperlink Click="Hyperlink_Click_11">
                                                    First lineup
                                                </Hyperlink>
                                            </TextBlock>
                                        </Grid>
                                    </DataTemplate>
                                </ListView.ItemTemplate>
                            </ListView>
                        </StackPanel>
                    </Border>
                </Grid>
            </TabItem>
        </TabControl>

        <Button Content="Back" HorizontalAlignment="Right" VerticalAlignment="Center"  Height="32" Width="95" Style="{StaticResource ModernButton}" Click="Button_Click"/>
        <Image HorizontalAlignment="Left" Height="70" Margin="10,5,0,0" VerticalAlignment="Top" Width="50" Source="/logo.jpg"/>
        <TextBlock Text="NBA Management System" Foreground="Gray" FontFamily="Segoe UI" Margin="50 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="20"/>
    </Grid>
</Window>
