<UserControl x:Class="FasdDesktopUi.Pages.DetailsPage.UserControls.DetailsPageStateContainer"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:FasdDesktopUi.Pages.DetailsPage.UserControls"
             xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
             xmlns:vc="clr-namespace:FasdDesktopUi.Basics.Converter"
             mc:Ignorable="d"
             d:DesignHeight="450"
             d:DesignWidth="800">

    <UserControl.Resources>
        <vc:LanguageDefinitionsConverter x:Key="LanguageConverter" />        
    </UserControl.Resources>

    <Border Background="{DynamicResource BackgroundColor.DetailsPage.Widget.Value}"
            CornerRadius="7.5"
            Padding="10">

        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>

            <Border x:Name="AddButton"
                    Grid.Row="0"
                    Panel.ZIndex="2"
                    CornerRadius="5"
                    Padding="5 2.5"
                    Background="{DynamicResource BackgroundColor.Menu.MainCategory}"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Top"
                    Cursor="Hand"
                    Visibility="Collapsed">
                <TextBlock Text="{Binding Converter={StaticResource LanguageConverter}, ConverterParameter=Global.Done }">
                    <TextBlock.Resources>
                        <Style TargetType="TextBlock">
                            <Setter Property="FontSize"
                                    Value="11.5" />
                            <Setter Property="Foreground"
                                    Value="{DynamicResource FontColor.Menu.Categories}" />

                            <Style.Triggers>
                                <DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorLevel=1, AncestorType=Border}, Path=IsMouseOver}"
                                             Value="True">
                                    <Setter Property="Foreground"
                                            Value="{DynamicResource FontColor.Menu.Categories.Hover}" />
                                </DataTrigger>
                            </Style.Triggers>
                        </Style>
                    </TextBlock.Resources>
                </TextBlock>
            </Border>

            <StackPanel x:Name="MainStackPanel"
                        Grid.Row="1" />

            <ico:AdaptableIcon x:Name="FullSizeButton"
                               Grid.Row="1"
                               HorizontalAlignment="Right"
                               VerticalAlignment="Top"
                               Style="{DynamicResource SettingsPage.Close.Icon}"
                               Margin="0 -10 -10 0"
                               BorderPadding="7.5"
                               MouseLeftButtonUp="FullSizeButton_MouseLeftButtonUp"
                               TouchDown="FullSizeButton_TouchDown"
                               SelectedMaterialIcon="ic_zoom_out_map" />
        </Grid>

    </Border>

</UserControl>
