<Window x:Class="Server_Dashboard.Views.DashboardPages.ModuleCRUD.CreateModulePopup"
        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:Server_Dashboard.Views.DashboardPages.ModuleCRUD"
        xmlns:root="clr-namespace:Server_Dashboard"
        d:DataContext="{d:DesignInstance Type=root:DashboardModuleViewModel}"
        mc:Ignorable="d"
        WindowStyle="None"
        ResizeMode="NoResize"
        Height="450"
        Width="300"
        AllowsTransparency="True"
        >
    <Border 
        Width="300"
        Height="450"
        >
        <Border.Background>
            <SolidColorBrush Color="#2D2D2D" Opacity="1"/>
        </Border.Background>
        <Border.Effect>
            <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
        </Border.Effect>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="30"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid 
                Background="{StaticResource BackgroundSurface_04dp}"
                Grid.Row="0"
                >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="40"/>
                </Grid.ColumnDefinitions>
                <TextBlock 
                    Grid.Column="0"
                    Text="Create a new Server"
                    Margin="5 0 0 0"
                    Foreground="{StaticResource DeepPurple_200}"
                />
                <Button 
                    Style="{StaticResource CloseButton}"
                    Grid.Column="2"
                    Content="✕"
                    Command="{Binding ClosePopupCommand}"
                />
            </Grid>
            <Grid
                Background="{StaticResource BackgroundSurface_04dp}"
                Grid.Row="1"
                Margin="20"
                >
                <Grid.Effect>
                    <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
                </Grid.Effect>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <StackPanel VerticalAlignment="Center" Grid.Row="0" Margin="20 0 20 0">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock 
                            Text="Server Name"
                            FontSize="16"
                            Margin="0 0 0 5"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.87"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                        <TextBlock 
                            Text="*" 
                            Foreground="{StaticResource ErrorRed}"
                            FontSize="16"
                        />
                    </StackPanel>
                    <Grid>
                        <Grid.Effect>
                            <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
                        </Grid.Effect>
                        <TextBox 
                            Text="{Binding ServerName}"
                            Grid.Column="1"
                            Height="30"
                            FontSize="14"
                            x:Name="ServerName"
                        />
                        <TextBlock 
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left"
                            Text="My Awesome Server"
                            FontSize="14"
                            Visibility="{Binding ElementName=ServerName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
                            Grid.Column="1"
                            IsHitTestVisible="False"
                            Margin="5 0 0 0"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.12"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                    </Grid>
                </StackPanel>
                <StackPanel VerticalAlignment="Center" Grid.Row="1" Margin="20 0 20 0">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock 
                            Text="Password"
                            FontSize="16"
                            Margin="0 0 0 5"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.87"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                        <TextBlock 
                            Text="*" 
                            Foreground="{StaticResource ErrorRed}"
                            FontSize="16"
                        />
                    </StackPanel>
                    <Grid>
                        <Grid.Effect>
                            <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
                        </Grid.Effect>
                        <PasswordBox
                            Width="220"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left"
                            root:MonitorPasswordProperty.Value="True"
                            Grid.Column="1"
                            FontSize="14"
                            x:Name="Password"
                            Height="30"
                            >
                        </PasswordBox>
                        <TextBlock
                            Visibility="{Binding ElementName=Password, Path=(root:HasTextProperty.Value), Converter={StaticResource UserNameVisibillity}}"                        x:Name="PasswordHint"
                            Text="********"
                            Grid.Column="1"
                            IsHitTestVisible="False"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left"
                            Margin="5 0 0 0"
                            FontSize="14"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.12"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                    </Grid>
                </StackPanel>
                <StackPanel VerticalAlignment="Center" Grid.Row="2" Margin="20 0 20 0">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock 
                            Text="Username"
                            FontSize="16"
                            Margin="0 0 0 5"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.87"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                        <TextBlock 
                            Text="*" 
                            Foreground="{StaticResource ErrorRed}"
                            FontSize="16"
                        />
                    </StackPanel>
                    <Grid>
                        <Grid.Effect>
                            <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
                        </Grid.Effect>
                        <TextBox 
                            Text="{Binding Username}"
                            Grid.Column="1"
                            Height="30"
                            FontSize="14"
                            x:Name="UserName"
                        />
                        <TextBlock 
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left"
                            Text="Name"
                            FontSize="14"
                            Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
                            Grid.Column="1"
                            IsHitTestVisible="False"
                            Margin="5 0 0 0"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.12"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                    </Grid>
                </StackPanel>
                <StackPanel VerticalAlignment="Center" Grid.Row="3" Margin="20 0 20 0">
                    <StackPanel Orientation="Horizontal">
                        <TextBlock 
                            Text="IP Adress"
                            FontSize="16"
                            Margin="0 0 0 5"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.87"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                        <TextBlock 
                            Text="*" 
                            Foreground="{StaticResource ErrorRed}"
                            FontSize="16"
                        />
                    </StackPanel>
                    <Grid>
                        <Grid.Effect>
                            <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
                        </Grid.Effect>
                        <TextBox 
                            Text="{Binding IPAdress}"
                            Grid.Column="1"
                            Height="30"
                            FontSize="14"
                            x:Name="IPAdress"
                        />
                        <TextBlock 
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left"
                            Text="sample.ssh.com"
                            FontSize="14"
                            Visibility="{Binding ElementName=IPAdress, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
                            Grid.Column="1"
                            IsHitTestVisible="False"
                            Margin="5 0 0 0"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.12"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                    </Grid>
                </StackPanel>
                <StackPanel VerticalAlignment="Center" Grid.Row="4" Margin="20 0 20 0">
                    <TextBlock 
                        Text="Port"
                        FontSize="16"
                        Margin="0 0 0 5"
                        >
                        <TextBlock.Foreground>
                            <SolidColorBrush Color="White" Opacity="0.87"/>
                        </TextBlock.Foreground>
                    </TextBlock>
                    <Grid>
                        <Grid.Effect>
                            <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
                        </Grid.Effect>
                        <TextBox 
                            Text="{Binding Port}"
                            Grid.Column="1"
                            Height="30"
                            FontSize="14"
                            x:Name="Port"
                        />
                        <TextBlock 
                            VerticalAlignment="Center"
                            HorizontalAlignment="Left"
                            Text="22"
                            FontSize="14"
                            Visibility="{Binding ElementName=Port, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}"
                            Grid.Column="1"
                            IsHitTestVisible="False"
                            Margin="5 0 0 0"
                            >
                            <TextBlock.Foreground>
                                <SolidColorBrush Color="White" Opacity="0.12"/>
                            </TextBlock.Foreground>
                        </TextBlock>
                    </Grid>
                </StackPanel>
            </Grid>
        </Grid>
    </Border>
</Window>
