<Window x:Class="Noctalk_client.MainWindow"
        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:uiButton="clr-namespace:Noctalk.UI.Components.Button"
        xmlns:uiChat="clr-namespace:Noctalk.UI.Components.Chat"
        xmlns:uiLeftButton="clr-namespace:Noctalk.UI.Components.Buttons_left_area"
        xmlns:uiInput="clr-namespace:Noctalk.UI.Components.Input"
        xmlns:uiLabel="clr-namespace:Noctalk.UI.Components.Label"
        xmlns:uiShell="clr-namespace:Noctalk.UI.Components.Shell"
        mc:Ignorable="d"
        Title="Noctalk" Height="720" Width="1180" MinWidth="1000" MinHeight="600" WindowState="Maximized"
        Background="#050912" Foreground="#49D9FF" AllowDrop="True"
        DragEnter="Window__drag_enter" DragOver="Window__drag_over" DragLeave="Window__drag_leave" Drop="Window__drop">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="260" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Border Grid.Column="0" Background="#060B14" BorderBrush="#123E5D" BorderThickness="0,0,1,0" Padding="0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <ScrollViewer Grid.Row="0" VerticalScrollBarVisibility="Auto" Background="#060B14">
                    <StackPanel x:Name="Conversation_list" HorizontalAlignment="Stretch" />
                </ScrollViewer>

                <Grid Grid.Row="1" Background="#060B14">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="6,6,6,6">
                        <uiLeftButton:Noctalk_left_area_button x:Name="Sound_toggle_button" Mode="Square" Icon="Sound_on" Color="Blue_O__Blue_O" Click="Sound_toggle_button__click" />
                        <uiLeftButton:Noctalk_left_area_button Icon="Log" Mode="Square" Color="Blue_O__Blue_O" Click="Log_button__click" />
                        <uiLeftButton:Noctalk_left_area_button x:Name="Admin_button" Icon="Admin" Mode="Square" Color="Blue_O__Blue_O" Visibility="Collapsed" Click="Admin_button__click" />
                    </StackPanel>
                    <uiLeftButton:Noctalk_left_area_button Grid.Row="1" Content="Close" Mode="Full_width" Color="Blue_O__Red_O" Click="Close_button__click" />
                </Grid>
            </Grid>
        </Border>

        <Grid x:Name="Middle_root_grid" Grid.Column="1" SizeChanged="Middle_root_grid__size_changed">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
                <RowDefinition x:Name="Middle_bottom_row" Height="150" />
            </Grid.RowDefinitions>

            <uiShell:Noctalk_shell_header Grid.Row="0" Margin="0" Padding="10,0" Height="42">
                <uiLabel:Noctalk_label x:Name="Middle_header_label" Text="Noctalk" Size="large" Foreground="#68E6FF" />
            </uiShell:Noctalk_shell_header>

            <Grid x:Name="Middle_content_grid" Grid.Row="1" Margin="14,0,14,0">
                <ScrollViewer x:Name="Message_scroll" VerticalScrollBarVisibility="Auto" Background="#050912">
                    <Grid HorizontalAlignment="Left" MaxWidth="1500" Width="{Binding ActualWidth, RelativeSource={RelativeSource AncestorType=ScrollViewer}}">
                        <StackPanel x:Name="Message_stack" Margin="14,0" />
                    </Grid>
                </ScrollViewer>
                <uiInput:Noctalk_textbox x:Name="Log_textbox" Visibility="Collapsed" IsReadOnly="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" BorderThickness="0" VerticalContentAlignment="Top" />
                <Border x:Name="Drop_overlay" Visibility="Collapsed" Background="#AA031A2F" BorderBrush="#49D9FF" BorderThickness="2">
                    <uiLabel:Noctalk_label x:Name="Drop_overlay_text" Text="Drop here" HorizontalAlignment="Center" VerticalAlignment="Center" Size="very_large" Foreground="#B9F3FF" />
                </Border>
            </Grid>

            <Grid x:Name="Message_input_panel" Grid.Row="2" Margin="0">
                <Grid.RowDefinitions>
                    <RowDefinition Height="1" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Border Grid.Row="0" HorizontalAlignment="Left" MaxWidth="1500" Width="{Binding ActualWidth, ElementName=Message_input_panel}" Background="#123E5D" />
                <Grid Grid.Row="1" HorizontalAlignment="Left" MaxWidth="1500" Width="{Binding ActualWidth, ElementName=Message_input_panel}">
                    <uiChat:Chat__send_message__area x:Name="Send_message_area" Margin="14,8,0,8" Send_requested="Send_message_area__send_requested" />
                </Grid>
            </Grid>
            <Border x:Name="Chat_max_width_boundary_line" Grid.Row="1" Grid.RowSpan="2" HorizontalAlignment="Left" Width="1" Margin="1500,0,0,0" Background="#123E5D" Visibility="Collapsed" IsHitTestVisible="False" />
            <StackPanel x:Name="Log_action_panel" Grid.Row="2" Visibility="Collapsed" Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,4,4,4">
                <uiButton:Noctalk_button x:Name="Copy_log_button" Width="46" Icon="Copy" Color="Blue_O__Blue_O" Click="Copy_log_button__click" />
                <uiButton:Noctalk_button Width="46" Icon="Clear" Color="Blue_O__Blue_O" Click="Clear_log_button__click" />
            </StackPanel>
            <Grid x:Name="Admin_content_host" Grid.Row="1" Grid.RowSpan="2" Visibility="Collapsed" HorizontalAlignment="Left" MaxWidth="1500" Width="{Binding ActualWidth, ElementName=Middle_root_grid}">
                <ContentControl x:Name="Admin_content" />
            </Grid>
            <Grid x:Name="Admin_action_panel" Grid.Row="2" Visibility="Collapsed" />
            <Border x:Name="Image_zoom_overlay" Grid.Row="1" Grid.RowSpan="2" Visibility="Collapsed" Background="#F0050912" MouseLeftButtonDown="Image_zoom_overlay__mouse_left_button_down" MouseWheel="Image_zoom_overlay__mouse_wheel">
                <Grid ClipToBounds="True">
                    <Image x:Name="Image_zoom_view" Stretch="Uniform" RenderTransformOrigin="0.5,0.5" MouseLeftButtonDown="Image_zoom_view__mouse_left_button_down" MouseLeftButtonUp="Image_zoom_view__mouse_left_button_up" MouseMove="Image_zoom_view__mouse_move" MouseWheel="Image_zoom_overlay__mouse_wheel" />
                </Grid>
            </Border>
        </Grid>

    </Grid>
</Window>
