<Window x:Class="NBAManagment.TeamDetail"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:NBAManagment"
        mc:Ignorable="d"
        Title="TeamDetail" Height="450" Width="800" Loaded="Page_Loaded" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="53*"/>
            <ColumnDefinition Width="107*"/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.ColumnSpan="2" Margin="0,58,0,-43">
            <TabControl Height="378">
                <TabItem Header="Roster">

                    <DataGrid Name="DataGridEmployee" AutoGenerateColumns="False" IsReadOnly="True">
                        
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="id" Binding="{Binding IdPlayerInTeam, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="id player" Binding="{Binding IdPlayer, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="id team" Binding="{Binding IdTeam, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="id season" Binding="{Binding IdSeason, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="shirt_number" Binding="{Binding ShirtNumber, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="salary" Binding="{Binding Salary, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="starter index" Binding="{Binding StarterIndex, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
                <TabItem Header="Matchup">
                    <DataGrid Name="DataGridEmployee1" AutoGenerateColumns="False" IsReadOnly="True">
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="id matchup detail" Binding="{Binding IdMatchupDetail, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="id matchup" Binding="{Binding IdMatchup, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="id quarter" Binding="{Binding IdQuarter, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="Team away score" Binding="{Binding TeamAwayScore, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                            <DataGridTextColumn Header="Team home score" Binding="{Binding TeamHomeScore, Mode = TwoWay, UpdateSourceTrigger= PropertyChanged}"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </TabItem>
            </TabControl>
        </StackPanel>
        <StackPanel RenderTransformOrigin="0.489,0.495" Margin="0,0,0,375" Grid.ColumnSpan="2" HorizontalAlignment="Left" Width="800">
            <StackPanel.RenderTransform>
                <TransformGroup>
                    <ScaleTransform ScaleY="1"/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </StackPanel.RenderTransform>
            <Grid Height="584" Width="800">

                <!-- Кнопка "Back" -->
                <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="Team Detail" VerticalAlignment="Center" FontSize="24" Margin="10,0,0,0" FontFamily="Century" FontWeight="Bold" Width="156"/>
                </StackPanel>

                <!-- Вкладки с конференциями -->
                <TabControl Grid.Row="1" Margin="10">
                    <TabItem Header="Eastern" TextBlock.FontFamily="Century">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1" Margin="5">
                                <StackPanel>
                                    <TextBlock Text="Central" FontSize="18" Margin="5" FontFamily="Century" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    <!-- Команды Центрального дивизиона -->
                                    <ItemsControl ItemsSource="{Binding CentralTeams}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" Margin="5">
                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
                                                        <Ellipse.ToolTip>
                                                            <TextBlock Text="{Binding TeamName}"/>
                                                        </Ellipse.ToolTip>
                                                    </Ellipse>
                                                    <StackPanel Orientation="Vertical">
                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
                                                        <StackPanel Orientation="Horizontal">
                                                            <Button Content="Roster" Margin="0,0,5,0"/>
                                                            <Button Content="Matchup" Margin="0,0,5,0"/>
                                                            <Button Content="First Lineup" Margin="0,0,5,0" />
                                                        </StackPanel>
                                                    </StackPanel>
                                                </StackPanel>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>
                            </Border>
                            <Border Grid.Column="2" BorderBrush="Black" BorderThickness="1" Margin="5">
                                <StackPanel>
                                    <TextBlock Text="Southeast" FontSize="18" Margin="5" FontFamily="Century" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    <!-- Команды Юго-восточного дивизиона -->
                                    <ItemsControl ItemsSource="{Binding SoutheastTeams}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" Margin="5">
                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
                                                        <Ellipse.ToolTip>
                                                            <TextBlock Text="{Binding TeamName}"/>
                                                        </Ellipse.ToolTip>
                                                    </Ellipse>
                                                    <StackPanel Orientation="Vertical">
                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
                                                        <StackPanel Orientation="Horizontal">
                                                            <Button Content="Roster" Margin="0,0,5,0"/>
                                                            <Button Content="Matchup" Margin="0,0,5,0" />
                                                            <Button Content="First Lineup" Margin="0,0,5,0" />
                                                        </StackPanel>
                                                    </StackPanel>
                                                </StackPanel>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>
                            </Border>
                            <ListView d:ItemsSource="{d:SampleData ItemCount=5}">
                                <ListView.View>
                                    <GridView>
                                        <GridViewColumn/>
                                    </GridView>
                                </ListView.View>
                            </ListView>


                        </Grid>
                    </TabItem>
                    <TabItem Header="Western" TextBlock.FontFamily="Century">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>
                            </Grid.ColumnDefinitions>
                            <Border Grid.Column="0" BorderBrush="Black" BorderThickness="1" Margin="5">
                                <StackPanel>
                                    <TextBlock Text="Northwest" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    <!-- Команды Северо-западного дивизиона -->
                                    <ItemsControl ItemsSource="{Binding NorthwestTeams}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" Margin="5">
                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
                                                        <Ellipse.ToolTip>
                                                            <TextBlock Text="{Binding TeamName}"/>
                                                        </Ellipse.ToolTip>
                                                    </Ellipse>
                                                    <StackPanel Orientation="Vertical">
                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
                                                        <StackPanel Orientation="Horizontal">
                                                            <Button Content="Roster" Margin="0,0,5,0" />
                                                            <Button Content="Matchup" Margin="0,0,5,0" />
                                                            <Button Content="First Lineup" Margin="0,0,5,0" />
                                                        </StackPanel>
                                                    </StackPanel>
                                                </StackPanel>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>
                            </Border>
                            <Border Grid.Column="1" BorderBrush="Black" BorderThickness="1" Margin="5">
                                <StackPanel>
                                    <TextBlock Text="Pacific" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    <!-- Команды Тихоокеанского дивизиона -->
                                    <ItemsControl ItemsSource="{Binding PacificTeams}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" Margin="5">
                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
                                                        <Ellipse.ToolTip>
                                                            <TextBlock Text="{Binding TeamName}"/>
                                                        </Ellipse.ToolTip>
                                                    </Ellipse>
                                                    <StackPanel Orientation="Vertical">
                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
                                                        <StackPanel Orientation="Horizontal">
                                                            <Button Content="Roster" Margin="0,0,5,0"/>
                                                            <Button Content="Matchup" Margin="0,0,5,0"/>
                                                            <Button Content="First Lineup" Margin="0,0,5,0"/>
                                                        </StackPanel>
                                                    </StackPanel>
                                                </StackPanel>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>
                            </Border>
                            <Border Grid.Column="2" BorderBrush="Black" BorderThickness="1" Margin="5">
                                <StackPanel>
                                    <TextBlock Text="Southwest" FontSize="18" Margin="5" VerticalAlignment="Center" HorizontalAlignment="Center"/>
                                    <!-- Команды Юго-западного дивизиона -->
                                    <ItemsControl ItemsSource="{Binding SouthwestTeams}">
                                        <ItemsControl.ItemTemplate>
                                            <DataTemplate>
                                                <StackPanel Orientation="Horizontal" Margin="5">
                                                    <Ellipse Width="50" Height="50" Fill="Orange" Margin="5,0,10,0">
                                                        <Ellipse.ToolTip>
                                                            <TextBlock Text="{Binding TeamName}"/>
                                                        </Ellipse.ToolTip>
                                                    </Ellipse>
                                                    <StackPanel Orientation="Vertical">
                                                        <TextBlock Text="{Binding TeamName}" FontWeight="Bold" Margin="0,0,0,5"/>
                                                        <StackPanel Orientation="Horizontal">
                                                            <Button Content="Roster" Margin="0,0,5,0"/>
                                                            <Button Content="Matchup" Margin="0,0,5,0" />
                                                            <Button Content="First Lineup" Margin="0,0,5,0"/>
                                                        </StackPanel>
                                                    </StackPanel>
                                                </StackPanel>
                                            </DataTemplate>
                                        </ItemsControl.ItemTemplate>
                                    </ItemsControl>
                                </StackPanel>
                            </Border>
                        </Grid>
                    </TabItem>
                </TabControl>
                <Button Content="Back" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="663,0,0,0"  Height="32" Width="95"  TextBlock.FontFamily="Century"/>
                <Image HorizontalAlignment="Left" Height="59" Margin="12,3,0,0" VerticalAlignment="Top" Width="23" Source="/logo.jpg" Grid.RowSpan="2"/>
                <TextBlock Text="NBA Management System" Foreground="Gray" FontFamily="Century" Margin="47,20,589,8" FontSize="10"/>

            </Grid>
        </StackPanel>
    </Grid>
</Window>
