<ui:UiWindow x:Class="Bloxstrap.UI.Elements.Dialogs.BulkAddFastFlagDialog"
        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:ui="http://schemas.lepo.co/wpfui/2022/xaml"
        xmlns:local="clr-namespace:Bloxstrap.UI.Elements.Dialogs"
        mc:Ignorable="d"
        Title="Import JSON" 
        MinHeight="0"
        Width="480"
        SizeToContent="Height"
        ResizeMode="NoResize"
        Background="{ui:ThemeResource ApplicationBackgroundBrush}"
        ExtendsContentIntoTitleBar="True"
        WindowStartupLocation="CenterScreen">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ui:TitleBar Grid.Row="0" Grid.ColumnSpan="2" Padding="8" Title="Import JSON" ShowMinimize="False" ShowMaximize="False" CanMaximize="False" KeyboardNavigation.TabNavigation="None" />

        <Grid Grid.Row="1" Margin="8,4,8,4">
            <TextBox x:Name="JsonTextBox" Margin="5" AcceptsTab="True" AcceptsReturn="True" MinHeight="80" MaxHeight="480" />
            <TextBlock IsHitTestVisible="False" Margin="18,14,0,0" Foreground="DarkGray">
                <TextBlock.Style>
                    <Style TargetType="{x:Type TextBlock}">
                        <Setter Property="Visibility" Value="Collapsed"/>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding Text, ElementName=JsonTextBox}" Value="">
                                <Setter Property="Visibility" Value="Visible"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </TextBlock.Style>
                 Paste in your JSON here...
            </TextBlock>
        </Grid>

        <Border Grid.Row="3" Margin="0,10,0,0" Padding="15" Background="{ui:ThemeResource SolidBackgroundFillColorSecondaryBrush}">
            <StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" HorizontalAlignment="Right">
                <Button MinWidth="100" Content="OK" Click="OKButton_Click">
                    <Button.Style>
                        <Style TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
                            <Style.Triggers>
                                <DataTrigger Binding="{Binding ElementName=JsonTextBox, Path=Text.Length}" Value="0">
                                    <Setter Property="IsEnabled" Value="False" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </Button.Style>
                </Button>
                <Button MinWidth="100" Margin="12,0,0,0" Content="Cancel" IsCancel="True" />
            </StackPanel>
        </Border>
    </Grid>
</ui:UiWindow>
