<UserControl x:Class="NETworkManager.Views.HTTPHeadersHostView"
        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:dragablz="clr-namespace:Dragablz;assembly=Dragablz"
        xmlns:IconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
        xmlns:Converter="clr-namespace:NETworkManager.Converters"
        mc:Ignorable="d">
    <UserControl.Resources>
        <Converter:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
        <Converter:NullOrEmptyToBoolConverter x:Key="NullOrEmptyToBoolConverter" />
    </UserControl.Resources>
    <UserControl.InputBindings>
        <KeyBinding Key="T" Modifiers="Ctrl" Command="{Binding AddTabCommand}" />
    </UserControl.InputBindings>
    <Grid>
        <dragablz:TabablzControl Focusable="False" Margin="0,-2,0,0" ClosingItemCallback="{Binding CloseItemCommand}" ItemsSource="{Binding TabItems}" SelectedIndex="{Binding SelectedTabIndex}" >
            <dragablz:TabablzControl.InterTabController>
                <dragablz:InterTabController InterTabClient="{Binding InterTabClient}" x:Name="InterTabController" />
            </dragablz:TabablzControl.InterTabController>
            <dragablz:TabablzControl.Style>
                <Style TargetType="{x:Type dragablz:TabablzControl}" BasedOn="{StaticResource DefaultTabablzControl}">
                    <Setter Property="HeaderSuffixContent" >
                        <Setter.Value>
                            <Grid HorizontalAlignment="Left" Width="40" Height="44">
                                <Button Style="{StaticResource CleanButton}" Command="{Binding AddTabCommand}" ToolTip="{DynamicResource String_NewTab}" Focusable="False">
                                    <Rectangle Width="20" Height="20">
                                        <Rectangle.OpacityMask>
                                            <VisualBrush Stretch="Fill" Visual="{IconPacks:Material Kind=Plus}" />
                                        </Rectangle.OpacityMask>
                                        <Rectangle.Style>
                                            <Style TargetType="{x:Type Rectangle}">
                                                <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
                                                <Style.Triggers>
                                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" Value="True">
                                                        <Setter Property="Fill" Value="{DynamicResource GrayBrush5}" />
                                                    </DataTrigger>
                                                </Style.Triggers>
                                            </Style>
                                        </Rectangle.Style>
                                    </Rectangle>
                                </Button>
                            </Grid>
                        </Setter.Value>
                    </Setter>
                    <Setter Property="ContentTemplate">
                        <Setter.Value>
                            <DataTemplate>
                                <ContentPresenter Content="{Binding View}" />
                            </DataTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </dragablz:TabablzControl.Style>
        </dragablz:TabablzControl>
        <Grid VerticalAlignment="Center">
            <Grid.Style>
                <Style TargetType="{x:Type Grid}">
                    <Setter Property="Visibility" Value="Collapsed" />
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding TabItems.Count}" Value="0">
                            <Setter Property="Visibility" Value="Visible" />
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Grid.Style>
            <StackPanel>
                <Button HorizontalAlignment="Center" Focusable="False" Command="{Binding AddTabCommand}" ToolTip="{DynamicResource String_NewTab}" Style="{StaticResource CleanButton}" Margin="0,0,0,10">
                    <Rectangle Width="20" Height="20">
                        <Rectangle.OpacityMask>
                            <VisualBrush Stretch="Fill" Visual="{IconPacks:Material Kind=Plus}" />
                        </Rectangle.OpacityMask>
                        <Rectangle.Style>
                            <Style TargetType="{x:Type Rectangle}">
                                <Setter Property="Fill" Value="{DynamicResource GrayBrush3}" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Button}}, Path=IsMouseOver}" Value="True">
                                        <Setter Property="Fill" Value="{DynamicResource GrayBrush5}" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Rectangle.Style>
                    </Rectangle>
                </Button>
                <TextBlock Text="{DynamicResource String_AddATabToQueryTheHTTPHeaders}" Style="{StaticResource MessageTextBlock}" />
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
