<Window x:Class="PerformanceMonitorDashboard.RemoveServerDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Confirm Remove Server"
        Height="230" Width="450"
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize"
        Background="{DynamicResource BackgroundBrush}">
    <Window.Resources>
        <BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>
    </Window.Resources>
    <Grid Margin="20">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <!-- Warning message -->
        <TextBlock Grid.Row="0" x:Name="WarningText" TextWrapping="Wrap" FontSize="13" Margin="0,0,0,15"/>

        <!-- Drop database checkbox -->
        <CheckBox Grid.Row="1" x:Name="DropDatabaseCheckBox" Margin="0,0,0,5"
                  Foreground="{DynamicResource ForegroundBrush}">
            <TextBlock Text="Also drop the PerformanceMonitor database and SQL Agent jobs on this server" TextWrapping="Wrap"/>
        </CheckBox>
        <TextBlock Grid.Row="2" Text="Warning: all collected monitoring data and scheduled collection jobs on the server will be permanently deleted."
                   FontSize="11" Foreground="{DynamicResource ErrorBrush}" Margin="20,0,0,15"
                   TextWrapping="Wrap" Visibility="{Binding ElementName=DropDatabaseCheckBox, Path=IsChecked, Converter={StaticResource BoolToVisibilityConverter}}"/>

        <!-- Buttons -->
        <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Content="Remove" Width="80" Height="28" Margin="0,0,8,0" Click="Remove_Click"
                    Foreground="{DynamicResource ErrorBrush}"/>
            <Button Content="Cancel" Width="80" Height="28" Click="Cancel_Click" IsCancel="True"/>
        </StackPanel>
    </Grid>
</Window>
